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

How do you display a Leaderstat Value in a Gui?

I'm making a Tycoon and I have made a leaderstat that is called 'Cash'. I'm trying to make a Gui that shows the amount of cash you have but I can't figure out how to do it. Please give a solution because everything I'm doing isn't working.

9 comments

0

c

0

Try it again changed the script a bit

0

Thanks!!!

0

Can you mark my answer as answer? so i got some point and the post will be marked as "answered"

0

How do I do that?

0

Look around my answer there should be a button to mark it

0

It says I need 25 Reputation to upvote. Is that it?

0

ah nvm its fine

0

it should be "Accept answer" button at the bottom

1 answer

✓ Accepted answer

Make a localscript inside the gui, and change the text to the value of 'Cash' everytime the value changes

example script :

local player = game.Players.LocalPlayer
local Cash = player:WaitForChild("leaderstats"):WaitForChild("Cash")

Cash.Changed:connect(function()
script.Parent.Text = Cash.Value
end)

3 comments

0

It's still not working.

0

what is not working? any error in the output windows? saying "it doesnt work" doesnt help me help you

0

It is not displaying the value. I found this in the Ouput window. https://gyazo.com/99d8179fe7af6a92f7b7ce81d0e2847d

This discussion is preserved as it was. New answers, comments, and votes are closed.