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: Simple Textlabel trouble?

Previous Thread :: Next Thread 
Skenderbeu98 is not online. Skenderbeu98
Joined: 11 Aug 2013
Total Posts: 467
14 May 2015 07:56 PM
For some reason this just isn't working...???
I even tried just label = "Metal" that doesn't even work either?
The funny thing is it prints "metal working" too

script.Parent.MouseButton1Click:connect(function()
local label = script.Parent.Parent.Label.Text
label = label.."Metal"
print("metal working")
end)
Report Abuse
FlyScript is not online. FlyScript
Joined: 05 Aug 2010
Total Posts: 2884
14 May 2015 08:05 PM
You're setting the variable "label" to whatever is in the label's text,a nd you are then appending it. You are not doing anything.

To set a value / property you must state which property in the defining statement:

script.Parent.MouseButton1Click:connect(function()
local label = script.Parent.Parent.Label
label.Text = label.Text.."Metal"
print("metal working")
end)
Report Abuse
Skenderbeu98 is not online. Skenderbeu98
Joined: 11 Aug 2013
Total Posts: 467
14 May 2015 08:08 PM
Thanks fly! I was never really good at strings lol.
Report Abuse
FlyScript is not online. FlyScript
Joined: 05 Aug 2010
Total Posts: 2884
14 May 2015 08:09 PM
It's just a minor syntax issue :)
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