How do I make it so when a player has a specific leaderstat value, a GUI appears on their screen?
✓ ANSWER ACCEPTED
How to make a GUI appear based on leaderstats?
1 answer
✓ Accepted answer
You can use .Changed event
so for example it would look like
local leaderstats = --your leaderstats folder
local value = --your value from leaderstats
local gui = --your gui
value.Changed:Connect(function()
gui.Enabled = true
end)
or else if you want to check if the new number is higher than a certain number
value.Changed:Connect(function(newValue)
if newValue > 0 then
gui.Enabled = true
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

6 comments
I'm using string value so there are no numbers involved
i didn't mean to mark answered...
you can try if newValue = "your text" then
Needed to add an extra '=' in there, but other than that, it worked .
Appreciate the help.
yeah forgot about that lol. No problems