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

How can you Change variables?

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

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

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