Is it possible for a function to use a local variable without calling it in a parameter?
I have a quick little thing here that I thought would work, but it does not.
value = script.Parent.Button.value.Value
text = script.Parent.Display.SurfaceGui.Amount.Text
function touch(part)
wait(.5)
part:Destroy()
value = value + 5
text = "Money: "..tostring(value)
end
script.Parent.Touched:connect(touch)
I do not get any error, but value and surfaceGUI do not change at all.
If you could explain what the issue may be that would be swell!
Thanks!

1 comment
They should change.
valueandtextare GLOBAL variables, not local variables.