|
| 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
|
  |
| 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 |
|
|
|
| 14 May 2015 08:08 PM |
Thanks fly! I was never really good at strings lol.
|
|
|
| Report Abuse |
|
|
FlyScript
|
  |
| Joined: 05 Aug 2010 |
| Total Posts: 2884 |
|
|
| 14 May 2015 08:09 PM |
| It's just a minor syntax issue :) |
|
|
| Report Abuse |
|
|