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

NumberValue not increasing by desired amount at desired time. Help?

I made a script that is supposed to make a NumberValue's value of 2.5 increase by 2.5 every second. However, the NumberValue's value is not increasing.

The NumberValue is a Child of the script.

script.Value.Value = t
t = 2.5

while true do
	t = t + 2.5
	wait(1)
end

1 answer

✓ Accepted answer

This will work, it was just the way you were referencing t

local t = script.Value
t.Value = 2.5
while true do
    t.Value = t.Value + 2.5
    wait(1)
print(t.Value) --For my testing
end

2 comments

0

It works! Thanks!

0

Next time, explain a bit more about what they were doing wrong.

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