1 | while true do |
2 | wait() |
3 | script.Parent.Text = "$" , game.Players.LocalPlayer.leaderstats.Money.Value |
4 | end |
I am trying to make it so the TextLabel displays the value of leaderstats with a dollar sign in front of it. I thought a comma would work. Thank you in advance.
1 | --EASY FIX: |
2 |
3 | while wait(. 1 ) do -- wait(.1) shortens the code and stops a game script timeout. |
4 | script.Parent.Text = "$" ..game.Players.LocalPlayer.leaderstats.Money.Value -- Changes the text |
5 | end |
Theres your fix!
wow, u forgot a 's', also your comma was not needed! This code was not working due to a simple spelling error.
My Fixed Up Code:
1 | while true do |
2 | wait() |
3 | script.Parent.Text = "$" game.Players.LocalPlayer.leaderstats.Money.Value -- forgot a s here and the comma is not needed |
4 | end |
Your Code:
1 | while true do |
2 | wait() |
3 | script.Parent.Text = "$" , game.Players.LocalPlayer.leaderstat.Money.Value |
4 | end |
as you can see, it is leaderstat instead of leaderstats. Also the comma is not needed. Hope this helps, Enjoy!