VVired
|
  |
| Joined: 26 May 2014 |
| Total Posts: 590 |
|
|
| 15 Dec 2016 02:57 PM |
| How do I make a GUI show money, like from a leaderboard? |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2016 03:03 PM |
If I want it to show a player name, I would do:
--This is a local script as a child of the gui
local label = script.Parent.TextLabel --Change to name of label
label.Text = script.Parent.Parent.Parent.Name
http://wiki.roblox.com |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2016 03:06 PM |
If you want it to update everytime a value changes do:
--Same stuff I said before --The label changes to the value of a string value in the player
local player = game.Players.LocalPlayer local label = script.Parent:WaitForChild("TextLabel") local sValue = player:WaitForChild("StringValue") --Change to name of value
sValue.Changed:connect(function() label.Text = sValue.Value end)
http://wiki.roblox.com |
|
|
| Report Abuse |
|
|
VVired
|
  |
| Joined: 26 May 2014 |
| Total Posts: 590 |
|
|
| 15 Dec 2016 03:08 PM |
| No, I want the leaderstats not the players name. |
|
|
| Report Abuse |
|
|
VVired
|
  |
| Joined: 26 May 2014 |
| Total Posts: 590 |
|
|
| 15 Dec 2016 03:15 PM |
local player = game.Players.LocalPlayer local label = script.Parent:WaitForChild("TextLabel") local sValue = player.leaderstats.Money
sValue.Changed:connect(function() label.Text = sValue.Value end)
I changed the script a little, but it won't work :( |
|
|
| Report Abuse |
|
|
VVired
|
  |
| Joined: 26 May 2014 |
| Total Posts: 590 |
|
| |
|
|
| 15 Dec 2016 03:18 PM |
no errors at all?
Formerly ToxicDominator - add 30,319 posts |
|
|
| Report Abuse |
|
|
VVired
|
  |
| Joined: 26 May 2014 |
| Total Posts: 590 |
|
| |
|
|
| 15 Dec 2016 03:22 PM |
| use prints to see if the blocks of code that you think should be running are actually running |
|
|
| Report Abuse |
|
|
VVired
|
  |
| Joined: 26 May 2014 |
| Total Posts: 590 |
|
|
| 15 Dec 2016 03:25 PM |
| nothing popped up in the output... |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2016 03:26 PM |
is it a local script? is it enabled? the answers to both should be yes
|
|
|
| Report Abuse |
|
|
|
| 16 Dec 2016 12:04 PM |
@VVired,
I was giving an example of what you could do. I am limited to how much I can help you because of the little code you have given us.
http://wiki.roblox.com |
|
|
| Report Abuse |
|
|