Like for example
if value.gold = 3 then frame.nameofframe.visible = true
Like for example
if value.gold = 3 then frame.nameofframe.visible = true
if you want them to have a certain number or above/below then try
game.Players.PlayerAdded:Connect(function(player) -- example event, will connect upon player added
local leaderstats = player:WaitForChild("leaderstats")
if leaderstats.Gold.Value == 10 then -- "==" is interchangable
frame.nameofframe.Visible = true
end
end)
if you want to see if there is a value named Gold in their leaderstats, then use this:
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = player:WaitForChild("leaderstats")
if leaderstats:FindFirstChild("Gold") then
frame.nameofframe.Visible = true
end
end
accept answer if this worked
This discussion is preserved as it was. New answers, comments, and votes are closed.