error is 14:04:29.454 Workspace.Script:3: attempt to index nil with ‘leaderstats’ - Server - Script:3
local Player = game.Players.LocalPlayer
if Player.leaderstats.Grow.value == Player.leaderstats.Grow.Value == 10 then
game.Workspace.Script.Disabled = true
game.Workspace.leaderstats.Disabled = true
game.StarterGui.GrowScreenGui.TextButton.LocalScript.Disabled = true
end
Is that a server script (regular script in serverscriptservice)? Nevermind, I found out its a regular script in workspace based off your error. You need to create a LocalScript and place it in StarterPlayerScripts. The code below should work.
local player = game.Players.LocalPlayer;
while true do
wait()
if player:FindFirstChild("leaderstats").Grow.Value == 10 then
workspace.Script.Disabled = true
workspace.leaderstats.Disabled = true
player:FindFirstChild("PlayerGui").GrowScreenGui.TextButton.LocalScript.Disabled = true
end
end
local player = game.Players.LocalPlayer;
while true do
wait()
if player:FindFirstChild("leaderstats").Grow.Value == 10 then
workspace.leaderstats.Disabled = true
player:FindFirstChild("PlayerGui").GrowScreenGui.TextButton.LocalScript.Disabled = true
script.Disabled = true
end
end
You must remove the Script in workspace, it serves no purpose as that script I posted above which should be put into a LocalScript inside of StarterPlayerScripts.
Regular scripts don’t know what LocalPlayer is. This has to be done on the client, not the server. Creat a LocalScript and put that localscript into StarterPlayerScripts. Then, copy that code I typed above and paste it into that script. Sorry to say, but if you’re not going to listen, I just won’t help.