I am making a script where when the player clicks the textbutton the intValue's value goes up by the upgrade (another intValue with the second script in it). The click script is here, and the output is: attempt to index global 'script' (a nil value)
upgrade = script.Parent.Parent.TextLabel.Upgrade -- this is a local script number = script.Parent.Parent.TextLabel.Number script.Parent.MouseButton1Click:connect(function() number.Value = ""..number.Value + upgrade.Value end)
This script is in an IntValue(not the textButton like above) and the IntValue is a child to a textlabel. The ouput is: attempt to index local 'player' (a nil value)
local pass = 182358984 -- this is not a local script local player = game.Players.LocalPlayer function Auth(player) return game:GetService('GamePassService'):PlayerHasPass(player.UserId, pass) end while true do if Auth() then script.Parent.Value = 3 else script.Parent.Value = 1 end end
if you could answer one that would be good too.
"game.Players.LocalPlayer", You can only do that in a LocalScript.