Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I make a gui appear when a player has a leaderboard stat?

Like for example

if value.gold = 3 then frame.nameofframe.visible = true

1 answer

✓ Accepted answer

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.