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

NumberValue not increasing by desired amount at desired time. Help? [closed]

Asked by 9 years ago

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

Locked by TheMyrco

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
3
Answered by 9 years ago

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
0
It works! Thanks! ChromeNine 50 — 9y
0
Next time, explain a bit more about what they were doing wrong. Muoshuu 580 — 9y
Ad