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

How do I fix my counting upwards script?

Asked by 4 years ago

Im trying to make a script that adds to a value every 3 seconds but it doesnt do anything, i dont see any errors on the output.

while true do
    local yes = 1
    local uuu = script.Parent.Text
    local iii = script.Parent.Value
    wait(3)
    uuu = iii.Value
    iii.Value = iii.Value + yes
end

please help me fix it.

0
try while true do local yes = 1 local uuu = script.Parent.Text local iii = script.Parent.Value wait(3) uuu = iii.Value iii.Value + yes end DeadStroke509 3 — 4y
0
ok pokemon9master29 6 — 4y
0
doesnt work pokemon9master29 6 — 4y

2 answers

Log in to vote
1
Answered by
Misqueso 145
4 years ago

You called for the value of a value.

iii = script.Parent.Value
iiii.Value

You should refer to iii as the object and get its value.

while true do
    local yes = 1
    local uuu = script.Parent.Text
    local iii = script.Parent
    wait(3)
    uuu = iii.Value
    iii.Value = iii.Value + yes
end
Ad
Log in to vote
0
Answered by 4 years ago

Why do you have

local uuu = script.Parent.Text
local iii = script.Parent.Value

from what i know, there is no instance that has both a text and a value

the variable iii should just be a number instead of script.Parent.Value because the parent should not have a number "value". it should have a "text" value

0
oop- pokemon9master29 6 — 4y

Answer this question