Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Whats the difference between these?

Ok, so in scripting you use

Baseplate = game.Workspace.Baseplate

To do stuff easier but... What is the difference between that

local Baseplate = game.Workspace.Baseplate

and this?? please help. :D

1 answer

✓ Accepted answer

You can only use the local in the script it is defined in.

6 comments

0

What???

0

If you say something like "local v=Workspace" then you can only use the variable for scripting in that script.

0

Oh, taking a guess, you can use variables in different scripts?! Like declare one in one script and use it in another? But local is only in that script? Or opposite or neither?

0

You can only use a local in the script you defined it in.

0

Okee.... I think. :)

0

Not the script, it's the chunk of code, or scope. http://wiki.roblox.com/index.php/Variables#Variable_Scopes All variables defined in a script are only to that script, unless you're talking about _G.

This discussion is preserved as it was. New answers, comments, and votes are closed.