|
| 08 Sep 2011 03:30 PM |
repeat wait() until game.Players.LocalPlayer:FindFirstChild("leaderstats") ~= nil totalko = game.Players.LocalPlayer.leaderstats.KOs totalwo = game.Players.LocalPlayer.leaderstats.KOs totalscore = game.Players.LocalPlayer.leaderstats.Score function changed() KO = game.Players.LocalPlayer.CurrentValue.CurrentKO WO = game.Players.LocalPlayer.CurrentValue.CurrentWO Score = game.Players.LocalPlayer.CurrentValue.CurrentScore realKO = game.Players.LocalPlayer.leaderstats.KOs.Value realWO = game.Players.LocalPlayer.leaderstats.WOs.Value realScore = game.Players.LocalPlayer.leaderstats.Score.Value KO.Value = totalko.Value - realKO WO.Value = totalwo.Value - realWO Score.Value = totalscore.Value - realScore end game.Players.LocalPlayer.leaderstats.KOs.Changed:connect(changed) game.Players.LocalPlayer.leaderstats.WOs.Changed:connect(changed)
Absolutely no output. I know it might be a little inefficient... |
|
|
| Report Abuse |
|
|
|
| 08 Sep 2011 03:32 PM |
1: Are you using a LocalScript? 2: I've never heard of such a thing as CurrentValue or CurrentKO or CurrentWo, so unless you defined them earlier in the script... |
|
|
| Report Abuse |
|
|
|
| 08 Sep 2011 03:34 PM |
First off: Yes I'm using a Local Script Second, CurrentKo, CurrentValue, etc. are values in the player. |
|
|
| Report Abuse |
|
|
|
| 08 Sep 2011 03:35 PM |
I think it might have something to do with the repeat line then.
This is a bit less "neat" but it always works for me:
while true do wait() if game.Players.LocalPlayer:FindFirstChild("leaderstats") ~= nil then break end end |
|
|
| Report Abuse |
|
|
|
| 08 Sep 2011 03:36 PM |
City try this, repeat wait() until game.Players.LocalPlayer:FindFirstChild("leaderstats") |
|
|
| Report Abuse |
|
|
|
| 08 Sep 2011 03:38 PM |
| Let's try, but I don't see any difference it could make.. |
|
|
| Report Abuse |
|
|
| |
|
GoldenUrg
|
  |
| Joined: 23 Aug 2009 |
| Total Posts: 6428 |
|
|
| 08 Sep 2011 03:56 PM |
In a localscript you can find the output in one of the log files. http://wiki.roblox.com/index.php/Debugging#Log_Files
|
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
GoldenUrg
|
  |
| Joined: 23 Aug 2009 |
| Total Posts: 6428 |
|
|
| 08 Sep 2011 06:51 PM |
Are you getting the Changed events?
|
|
|
| Report Abuse |
|
|
|
| 08 Sep 2011 08:30 PM |
The leaderstats are changing yes, but they won't change the CurrentValue stats...
|
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 09 Sep 2011 03:15 PM |
What doesn't it do? And what do you want it to do? I have read it but found no errors, maybe just some loading problems.
[If I owned a school, it would be closed by now.] |
|
|
| Report Abuse |
|
|
|
| 09 Sep 2011 03:19 PM |
| Can't be loading problems can it? It doesn't change the values... |
|
|
| Report Abuse |
|
|
|
| 09 Sep 2011 03:22 PM |
KO.Value = totalko.Value - realKO WO.Value = totalwo.Value - realWO
It will always be zero.
[If I owned a school, it would be closed by now.] |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Sep 2011 03:32 PM |
Because realKO and realWO or whatever they are, are set to totalko's and totalwo's values. Therefore taking them away from totalko's and totalwo's value will result in 0.
[If I owned a school, it would be closed by now.] |
|
|
| Report Abuse |
|
|
|
| 09 Sep 2011 03:38 PM |
But they change... TotalKo, don't change since I set their value before the function. The RealKo change because I set their value after the function.
It could be the other way around. |
|
|
| Report Abuse |
|
|
GoldenUrg
|
  |
| Joined: 23 Aug 2009 |
| Total Posts: 6428 |
|
|
| 09 Sep 2011 04:06 PM |
He's right, if you want to save the value of KOs you need to use value.
repeat wait() until game.Players.LocalPlayer:FindFirstChild("leaderstats") ~= nil totalko = game.Players.LocalPlayer.leaderstats.KOs.Value totalwo = game.Players.LocalPlayer.leaderstats.KOs.Value totalscore = game.Players.LocalPlayer.leaderstats.Score.Value function changed() KO = game.Players.LocalPlayer.CurrentValue.CurrentKO WO = game.Players.LocalPlayer.CurrentValue.CurrentWO Score = game.Players.LocalPlayer.CurrentValue.CurrentScore realKO = game.Players.LocalPlayer.leaderstats.KOs.Value realWO = game.Players.LocalPlayer.leaderstats.WOs.Value realScore = game.Players.LocalPlayer.leaderstats.Score.Value KO.Value = totalko - realKO WO.Value = totalwo - realWO Score.Value = totalscore - realScore end game.Players.LocalPlayer.leaderstats.KOs.Changed:connect(changed) game.Players.LocalPlayer.leaderstats.WOs.Changed:connect(changed) |
|
|
| Report Abuse |
|
|
| |
|
| |
|