Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My script to make 1 value 1 more then a different value won't work?

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

1 comment

0

Try "if (level) == (lastlevel) then (level) = (level) + 1 end" (replacing (level) and (lastlevel) with the appropriate paths). Put on line 5.

2 answers

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

4 comments

0

NumberValues will work.

0

No. They never did for me.

0

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.).

0

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.