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

IntValues and Addition?

Asked by 7 years ago
Edited 7 years ago

This is a script that is supposed increase the IntValue by 1 but it is just staying on 1. It is written in a local script but I dont think thats the problem since I tried a normal script as well. Heres the script and hierarchy.

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

Starter GUI LocalScript Chillers
Value

1 answer

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

Im kinda new to this website, and cannot find the comment bar.

My first question is if the first ".Value" is an ObjectValue or an IntValue

if it is an IntValue, than you do not need the extra .Value

Also variables helpers.

local int_value = script.Parent.Chillers 


while true do 
    int_value.Value = int_value.Value + 1
    wait(0.1)
end 
0
I found the comment bar, the above post is a question I am asking TheLowOne 85 — 7y
0
Btw, if it is an objectvalue for the first instance, your missing the + 1, or is it just me TheLowOne 85 — 7y
Ad

Answer this question