it a local script only 1 people can see i think so that fine yes my grammer is bad becousi i no yes ingliss
while true do local plr = game.Player.LocalPlayer if plr.WaitForChild("leaderstats").Money.Value = 100 then workspace.ButtonModel.Color = Color.new("Pastel Blue") end end
Hello, ProbablyRiley.
I see a few errors.
Explanation after the script
while true do local plr = game.Player.LocalPlayer if plr.WaitForChild("leaderstats”).Money.Value = 100 then workspace.ButtonModel.BrickColor == BrickColor.new("Pastel Blue") end end
at line 3 you forgot ==, and in line 4 you forgot brick color but did color instead
Optimized version, since you don't need a loop.
-- Index static variables outside of function local localPlayer = game.Players.LocalPlayer local leaderstats = localPlayer:WaitForChild('leaderstats') local ButtonModel = workspace:WaitForChild("ButtonModel") -- Anyonymous function checks for Value changing leaderstats:GetPropertyChangedSignal("Value"):Connect(function() -- == compares, = sets if leaderstats.Value == 100 then -- BrickColor, not Color. ButtonModel.BrickColor == BrickColor.new("Pastel Blue") end end)