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
 

Displaying values in GUIs

Previous Thread :: Next Thread 
majoko1 is not online. majoko1
Joined: 31 Jan 2009
Total Posts: 22799
02 Feb 2015 07:42 PM
game.Players.PlayerAdded:connect(function(Player)

local coinvalue = Instance.new("NumberValue")
coinvalue.Parent = Player
coinvalue.Value = 100

wait(0.125)

Player.PlayerGui.MajCoins.Display.Text = "MAJCOINS: "..coinvalue

end)

------------------------------------------------------------


Keeps giving me the following error:

"Workspace.Data:14: attempt to concatenate local 'coinvalue' (a userdata value)"
Report Abuse
Lucas1270z is not online. Lucas1270z
Joined: 27 Feb 2013
Total Posts: 439
02 Feb 2015 07:43 PM
coinvalue itsself is an instance, so replace

Player.PlayerGui.MajCoins.Display.Text = "MAJCOINS: "..coinvalue

with

Player.PlayerGui.MajCoins.Display.Text = "MAJCOINS: "..coinvalue.Value

its a common mistake
Report Abuse
majoko1 is not online. majoko1
Joined: 31 Jan 2009
Total Posts: 22799
02 Feb 2015 07:45 PM
I've done this 3 times in the past 2 minutes...

I made the error again and couldnt catch it that time hahahaha
Report Abuse
ImageLabel is not online. ImageLabel
Joined: 08 Dec 2012
Total Posts: 428
02 Feb 2015 07:47 PM
"MAJCOINS: "..coinvalue.Value

You were attempting to set the GuiObject's value to the actual `NumberValue` instance, instead of it's `Value` property.
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