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

How do i add 1 to a number value?

I'm trying to add +1 to my number value but it's not working here's the script

if game.ReplicatedStorage.Value.Value <9 then game.ReplicatedStorage.Value.Value = +1 wait(1) end

4 comments

0

im new to scripting sorry

0

Value.Value = Value.Value + 1

0

shows us the leaderboard script if it still doesn't work

0

Make sure it's in a Script not a Local script

1 answer

In Lua, it would be:

game.ReplicatedStorage.Value.Value = game.ReplicatedStorage.Value.Value + 1

3 comments

0

Agreed.

0

the value still stays at 0

0

What value are you using? It should be a IntValue or NumberValue.

This discussion is preserved as it was. New answers, comments, and votes are closed.