local lighting = game.Workspace.Model
local light = lighting.LightPart
local timeOutput = game.Lighting:GetMinutesAfterMidnight()
local nightStandard = 6
local dayStandard = 18
local num = 2
local function DayNightCycle()
while wait(.2) do
num = num + 1
game.Lighting:SetMinutesAfterMidnight(num *60)
print(game.Lighting.TimeOfDay)
end
end
local function bindToTime()
print("binded")
end
while wait(1) do bindToTime() end
DayNightCycle()
For some explanation, I'd like to add that switch the bindToTime function being called and DayNightCycle does matter, because if I add DayNightCycle() first, bindToTime() won't work. How can I prevent from one function being called automatically stopping the entire script?

1 comment
Thank you, this helped alot!