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

How can you Change variables?

Asked by 10 years ago
gtime = 0
--time handling
while gtime do
    gtime = 1 + gtime
    if gtime >= 240 then
    gtime = gtime - 1
    elseif gtime <= 0 then
    isNight = true
    else isNight = false
    return
    end
end

while wait() do

-- code

end

won't work for this matter.

I'm trying to make time where every second is 10 minutes but as you can see, its not going well.

1 answer

Log in to vote
0
Answered by 10 years ago
gtime = 0

while wait(gtime) do
    gtime = 1 + gtime
    if gtime >= 240 then
    gtime = gtime - 1
    elseif gtime <= 0 then
    isNight = true
    else isNight = false
    return
    end
end
Ad

Answer this question