Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Whats the difference between these?

Asked by 10 years ago

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

Log in to vote
1
Answered by 10 years ago

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

0
What??? starkiller523 65 — 10y
0
If you say something like "local v=Workspace" then you can only use the variable for scripting in that script. ChipioIndustries 454 — 10y
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? starkiller523 65 — 10y
0
You can only use a local in the script you defined it in. ChipioIndustries 454 — 10y
View all comments (2 more)
0
Okee.... I think. :) starkiller523 65 — 10y
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. infalliblelemon 145 — 10y
Ad

Answer this question