So I have this part of a script that is a 'if' statement,
if numoflemons == 0 then
newstand = standmodel:Clone()
newstand.Parent = game.Workspace
else
newstand.screen.SurfaceGui.TextLabel.Text = "Lemonade Stands : "..numoflemons.Value
end
and when I add
local
in front of
newstand = standmodel:Clone()
the part after else (so this part:)
newstand.screen.SurfaceGui.TextLabel.Text = "Lemonade Stands : "..numoflemons.Value
says 'Unknown global 'newstand'' and when I remove the local, the variable says 'Global 'newstand' is only used in the enclosing function; consider changing it to local' So my question is, is it glitched? Or am I doing something wrong here?

4 comments
Put in front of the if statement: "local newstand".
That'll mess up what I want it to do
Really? How?
It'll clone it even if there is already a clone