I am making a game where when you press the screen (textButton) the number goes up. Here is the explorer.
StarterGui > TextLabel > Value
TextButton > LocalScript
the error is ... :9: attempt to index global 'script' (a nil value) here is the script to make in IntValue go up,
local pass = 182358984
local number = 0
local upgrade = 1
function Auth(player)
return game:GetService("GamePassService"):PlayerHasPass(player, pass)
end
script.Parent.MouseButton1Click:connect(function()
if Auth then
local upgrade = 3
end
number = number + upgrade
script.Parent.Parent.TextLabel.Value.Value = "".. number
end)
