For a RPG like game, I am trying to make it so the Level will only go up by one if the lastlevel value is the same as the level.
1 | P = game.Players.LocalPlayer |
2 |
3 | while true do |
4 | wait() |
5 | P.bin.Level.Value = P.bin.LastLevel.Value + 1 |
6 | end |
If it's a NumberValue
, it probably won't work. You'd probably need an IntValue
. And use the same script.
Or keep it a NumberValue
and do:
1 | P = game.Players.LocalPlayer |
2 |
3 | while true do |
4 | wait() |
5 | P.bin.Level.Value = tonumber (P.bin.LastLevel.Value) + 1 |
6 | end |
Another thing, Don't forget wait() in loops or lag will probably kill everything.