Navydev
|
  |
| Joined: 21 Feb 2012 |
| Total Posts: 274 |
|
|
| 26 Feb 2012 03:59 PM |
Seriously, its only about values. http://www.roblox.com/Forum/ShowPost.aspx?PostID=63501845 |
|
|
| Report Abuse |
|
|
stravant
|
  |
 |
| Joined: 22 Oct 2007 |
| Total Posts: 2893 |
|
|
| 26 Feb 2012 04:17 PM |
The problem is that the contents of the `val` variable is a number. Numbers are a basic Lua type and they obviously have no `Changed` event in them, they can't change, the number 1 will always be the number 1.
You need to get the changed event on the NumberValue object, not the number:
obj:findFirstChild("UpgP").Changed:connect(function() |
|
|
| Report Abuse |
|
|
Navydev
|
  |
| Joined: 21 Feb 2012 |
| Total Posts: 274 |
|
|
| 26 Feb 2012 04:24 PM |
| Thanks stravant. I forgot about that. :/ |
|
|
| Report Abuse |
|
|
stravant
|
  |
 |
| Joined: 22 Oct 2007 |
| Total Posts: 2893 |
|
|
| 26 Feb 2012 04:36 PM |
| In the future it may help to think of the `=` operator as a construct which takes a value out of one box and puts it into another box. That is to say that it does not create any inherent link between the expressions on either side of the `=` operator, it simply moves things around. |
|
|
| Report Abuse |
|
|