|
| 14 Mar 2016 01:42 PM |
I want to add if the leaderstat XP is *100 more than the leaderstat levels then XP = 0. to this script.Parent.Parent.Text = script.Parent.Value script.Parent.Changed:connect(function() script.Parent.Parent.Text = script.Parent.Value script.Parent.Parent.Parent.Parent.Parent.Parent.Parent:WaitForChild("leaderstats"):WaitForChild("XP").Value = script.Parent.Value end) |
|
|
| Report Abuse |
|
|
Scerzy
|
  |
| Joined: 27 Dec 2010 |
| Total Posts: 1082 |
|
|
| 14 Mar 2016 01:47 PM |
| We don't know anything about this script because you haven't told us what's the parent of what and what's changing |
|
|
| Report Abuse |
|
|
|
| 14 Mar 2016 01:56 PM |
well the script.parent is the value.
so I'd say something like this
if leaderstat.XP = 100* leaderstat levels, then script.Parent.Value = 0
but idk how to finish it.
script.Parent.Value is XP, I have two XP values, but don't worry about that.
I just want script.Parent to = 0 if the leaderstat = -0 |
|
|
| Report Abuse |
|
|
Scerzy
|
  |
| Joined: 27 Dec 2010 |
| Total Posts: 1082 |
|
|
| 14 Mar 2016 01:59 PM |
Add in another change function. If the leaderstat level changes, then subtract the amount of XP required to advance to that level from the exp the dude has
So for example if you need 200 exp to go from level 1 to 2, when that level changes, subtract 200 exp from the total exp the player has. |
|
|
| Report Abuse |
|
|
|
| 14 Mar 2016 02:03 PM |
Yes I know that, but I don't know how to get to the leaderstats, like I have a leaderstat script but I don't know how to get to it.
like
leaderstat.XP or do I have to call the leaderstat I don't know how to do that. |
|
|
| Report Abuse |
|
|