huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 26 Feb 2013 07:35 PM |
So, this is just supposed to change your stats and play a sound when you level up, but, it won't. No output.
player = script.Parent stats = player.Stats -- stats.XPNEEDED.Value = (stats.Level.Value * 100) --It doesn't even run this part. function onChanged() if stats.XP.Value >= stats.XPNEEDED.Value then stats.Level.Value = stats.Level.Value + 1 wait() stats.XP.Value = 0 stats.XPNEEDED.Value = (stats.Level.Value * 100) script.LevelUpSound:Play() end end stats.XP.Changed:connect(onChanged) |
|
|
| Report Abuse |
|
|
|
| 26 Feb 2013 07:36 PM |
| Are ALL the variables set? |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
| |
|
|
| 26 Feb 2013 07:39 PM |
Looking at the part that says "player = script.Parent" What object is the parent? |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 26 Feb 2013 07:41 PM |
If I were in playmode-
game >Players >>huner2 >>>This Script |
|
|
| Report Abuse |
|
|
|
| 26 Feb 2013 07:44 PM |
| Ehm..... did you try a GetChildren script? |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
| |
|
|
| 26 Feb 2013 07:47 PM |
| GetChildren is a service that allows all of the children to be highlighted of what you selected. And FindFirstChild would have to accompany it. |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 26 Feb 2013 07:47 PM |
| I know that much, I just did not understand what you meant by "GetChildren script". |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
| |
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
| |
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 26 Feb 2013 09:59 PM |
| Scripts and LocalScripts _WILL_NOT_ run as a direct descendant of Player. |
|
|
| Report Abuse |
|
|