I want to make a day and night cycle for my game but just tweaking the clocktime doesn't look that great (for example, night time isn't blue, sunset and sunrise aren't orange). the solution to this is to make the atmosphere data (like colors or density) change depending on the current clocktime numbers, but, how do I even do that? do I keep like 4 template atmospheres disabled in lightning service and make the script slowly adjust the main atmosphere to match the templates?
#most efficient way to tweak atmosphere?
1 messages · Page 1 of 1 (latest)
basing it off the wild west which has atmosphere slowly morph through the day before rapidly changing lighting at like 6 am or 6 pm
** You are now Level 9! **
i have never tried to do anything like this, but my guess would be make numbersequences for each value you want to change
use tweenservice to change lighting clicktime
like
local TS=game:GetService("TweenService")
local LightingService=game:GetService("Lighting")
TS:Create(LightingService, TweenInfo.new(however long you want it to be), {ClockTime=also however you want it to be 1 through 24 }):Play()
also you have to use task.wait() because TS practically runs in the background and does it while other code is running after it
aren't tweenservices just for particles and beams?
thanks for the script but i think you misunderstood what im asking, i get how to tweak clocktime but im trying to figure out how to have the script also edit atmosphere data based off clocktime "just tweaking the clocktime doesn't look that great (for example, night time isn't blue, sunset and sunrise aren't orange)."
hm
I think I have the two best ideas for it already, which one would be better? I could either have a table with a few templates like "night" "day" "sunset" and "sunrise" and make the script tween between those
or i could use
like 4 template atmosphere instances stored in lighting
yeah that's what im saying
should i use a table or should i use atmosphere instances?
a table of what
a table of information for each time
like sunset would be orange
just use atmosphere instances
why do u prefer instances? i heard it might cause less performance idk
well it depends on what youre trying to make the sky look like
the amount of properties
and stuff
I believe if you use numbersequences, colorsequences etc you can transition smoothly. Basically just make a table of every value u might want to tweak, make a numbersequence for each one. Then make a for i statement where you edit all the value based on the time or sum