generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: GUI show variable

Previous Thread :: Next Thread 
VVired is not online. 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
UltimateRaheem is not online. UltimateRaheem
Joined: 10 Nov 2012
Total Posts: 1886
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
UltimateRaheem is not online. UltimateRaheem
Joined: 10 Nov 2012
Total Posts: 1886
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 is not online. 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 is not online. 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 is not online. VVired
Joined: 26 May 2014
Total Posts: 590
15 Dec 2016 03:17 PM
bump
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
15 Dec 2016 03:18 PM
no errors at all?

Formerly ToxicDominator - add 30,319 posts
Report Abuse
VVired is not online. VVired
Joined: 26 May 2014
Total Posts: 590
15 Dec 2016 03:20 PM
nope
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
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 is not online. VVired
Joined: 26 May 2014
Total Posts: 590
15 Dec 2016 03:25 PM
nothing popped up in the output...
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
15 Dec 2016 03:26 PM
is it a local script? is it enabled? the answers to both should be yes
Report Abuse
UltimateRaheem is not online. UltimateRaheem
Joined: 10 Nov 2012
Total Posts: 1886
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image