Why does Studio skip 7 and adds 8000 by their self?
Asked by
5 years ago Edited 5 years ago
01 | if script.Parent.Parent.LoadingDone.Value = = false then |
03 | if current < player.leaderstats.Levels.Value * 1000 then break end |
04 | current = current - (player.leaderstats.Levels.Value * 1000 ) |
06 | player.leaderstats.Levels.Value = player.leaderstats.Levels.Value + 1 |
07 | print (player.leaderstats.Levels.Value) |
11 | current = player.Exp.Value |
12 | script.Parent.Parent.LoadingDone.Value = true |
13 | level = player.leaderstats.Levels.Value |
14 | lead_level = player.leaderstats.Levels |
This is a part of my code.
So let's say we have 15000 exps. (When first joining the game)
we will load the exp to levels. In Level 1 you need 1000 on lv 2 you need 2000 etc. like that
well I'm not very used to repeat ~ until, so I replaced it with a while statement.
I will tell you the outputs
well, you can't do 487 -(6*1000), so I thought it will stopover here, but instead, Lv7 disappeared and the exps became 8487 and straight went to Lv9. Why did studio do this?