Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to constantly add +1 to a value?

Asked by 3 years ago

How would I make a value get +1 every second? I tried this it doesnt work... This is my first try with using math in roblox

while true do
    wait(1)
    script.Parent.Value = script.Parent.Value.Value+1
end

1 answer

Log in to vote
0
Answered by 3 years ago

+= will increment value by the number.

while true do
    wait(1)
    script.Parent.Value += 1
end
0
Thanks! User#39520 0 — 3y
Ad

Answer this question