This script works in studio but not roblox itself, I don't know what's wrong?
local button = script.Parent
game.Players.PlayerAdded:Connect(function()
local purchases = game.Players.LocalPlayer:WaitForChild("leaderstats1"):WaitForChild("Purchases2")
if purchases.Value == 3 then
print("MVP")
button.Visible = true
button.Parent:WaitForChild("MVP1"):WaitForChild("TextLabel").Visible = false
else
print("Bye")
button.Visible = false
end
end)

1 comment
I would NOT use a localscript to check leaderstats my friend