|
RBLX_Lua will not allow you to tag your name just like regular. Ex:
Workspace.4camera.Humanoid:TakeDamage(100) -- sorry 4camera
Would error because it would say "unexpected symbol near '4'"
There's a way you can fix this. Just when you type Workspace, for you put the period, put a bracket, open a string, put your name, then close the string in the bracket. Example:
Workspace["4camera"].Humanoid:TakeDamage(100) -- It's that easy!
Thanks to you for viewing this. ALSO: Real scripters, please tell me if I am outdated, I just remeber old RBLX.Lua. Thanks.
- van van |
|
arundelJoin Date: 2008-04-21 Post Count: 5762 |
Yay, you achieved to put a string (username) in a string. ¬_¬ |
|
|
You try putting a model in, naming it 4a, then index it and removeit. It won't work without [""] |
|
EmessJoin Date: 2010-04-01 Post Count: 13331 |
captain obvious strikes again |
|
bloob827Join Date: 2010-08-01 Post Count: 6867 |
You can't tag anything that begins with a number, too. :P
|
|
4cameraJoin Date: 2008-03-09 Post Count: 953 |
Geez, thanks for the advice I already knew. |
|
|
Hey, I said BEGINNER, Emess... so shaddap. >:U |
|
|
THIS WAS NOT DIRECTLY TAGGED TO EVERYONE ELSE. I SAID NEW_TO_SCRIPTING SPECIFICALLY, SO STOP ._. |
|
|
|
Up on the house top people don't read bump bump bump, down to the Post button with Good White Cursor. |
|
ScriptoarJoin Date: 2010-08-25 Post Count: 4025 |
Stop flaming him for helping some new people out, gosh. |
|
|
ChatRJoin Date: 2010-11-05 Post Count: 277 |
cool but can u explain coroutine.wrap()()
coroutine.wrap(function()script.Parent.Touched:connect(function(s)pcall(function()s.Parent:breakJoints()end)end)end)()
that??? |
|
|
... easy much? It creates a coroutine by using the body of a function. :P |
|
ChatRJoin Date: 2010-11-05 Post Count: 277 |
No. I meant what is coroutine.wrap()(). |
|
|
Chat, just because you know one thing, it doesn't make you any better than anyone else. |
|
ChatRJoin Date: 2010-11-05 Post Count: 277 |
what? i'm serious? what is coroutine.wrap()()???
... |
|
|
vat21sJoin Date: 2010-06-07 Post Count: 2508 |
better way is to use
findFirstChild() |
|
ShokwavJoin Date: 2008-08-16 Post Count: 9263 |
Wrap, a the second second of parenthesis executes the function.
Just like:
(function() print"a" end)() |
|
ShokwavJoin Date: 2008-08-16 Post Count: 9263 |
@vat21s: No, it's not, because :findFirstChild() only works on userdata. |
|