Please tell me what is wrong with this script. I also want to know how to make the TextButton not visable.
function onClick()
while true do
game.Players.LocalPlayer.leaderstats.Score.Value = game.Players.LocalPlayer.leaderstats.Score.Value + 1
local str = game.Players.LocalPlayer.leaderstats.Score.Value
local str1 = "Your income: "
game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.TextLabel.Text = str1..str
game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.TextButton.Visable = false
wait(1)
end
end
script.Parent.TextButton.MouseButton1Click:connect(onClick)

2 comments
Oh really? Okay.
Yeah, essentially it has something to do with script loading faster than GUI objects, so it errors. It's kind of silly.