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.
P = game.Players.LocalPlayer
while true do
wait()
P.bin.Level.Value = P.bin.LastLevel.Value + 1
end
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.
P = game.Players.LocalPlayer
while true do
wait()
P.bin.Level.Value = P.bin.LastLevel.Value + 1
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:
P = game.Players.LocalPlayer
while true do
wait()
P.bin.Level.Value = tonumber(P.bin.LastLevel.Value) + 1
end
NumberValues will work.
No. They never did for me.
Number Values do work; They just allow the use of Decimals (Example: 1.25, 1.64, .54, .43, ect.), unlike Int Values where they only allow an Estimated whole number (Example: 1, 2, 76, 43, 56, ect.).
Yes, Numbervalues work. This script used to work perfect. Then I think roblox broke it with an update.
Another thing, Don't forget wait() in loops or lag will probably kill everything.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Try "if (level) == (lastlevel) then (level) = (level) + 1 end" (replacing (level) and (lastlevel) with the appropriate paths). Put on line 5.