Since after you put an end you can't use local what is the point
like for example
local part = game.workspace.part end --cannot use anymore --new script part = game.workspace.part end part.BrickColor = BrickColor.new("Lavender") --I dont get why people use local in some of the scripts
Here's a link to an page about Scopes Anyway's I don't remember all the reasons but here's an example why local variables might work better.
This works but however if I were to do this
local Function Test() local Test = "Test" wait(1) end local Function Test2() local Test = "Test" end
But if I do this then Test get's replaced with Test2.
local Function Test() Test = "Test" wait(1) print(Test) end local Function Test_2() Test = "Test2" print(Test) end
Marked as Duplicate by RayCurse, Vulkarin, and User#19524
This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.
Why was this question closed?