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

Timed action for day and night?

Asked by 7 years ago

Well. Strait to the point I'm making a realistic game, and I want a script saying "Ok its 8:30 suns down, make the color correction dark blue" How would i do that? and make it return to day in my game the color corection color for day is a tan and at night its dark blue. How would i make a script to do that?

0
Pretty much this paragraph summed up: "At night turn color correction to dark blue at day turn it to tan" Tsb102403 -9 — 7y
0
ive had the same problems,but i Figured the script right away!this may not be that helpful but atleast im giving you the script! fardeen10451 0 — 7y
0
all you need is on your hands!go to the (toolbox) Section,you will find alot of stuff,if your on Models or see Models On The Text Somewhere,your right on the track!Search In ''Day and Night script''once you found a script,your basically done. fardeen10451 0 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

I don't exactly understand your wording of "color correction". I'm guessing its the Ambient property in Lighting. I made this script that constantly checks the TimeOfDay in Lighting. It runs two different if statements at 20:00:00 (8pm) and 6:00:00 (6am). You can add your color correction code inside of the if statements.

while true do
    if game.Lighting:GetMinutesAfterMidnight() == 20 * 60 then
        -- Runs when TimeOfDay gets to 8 at night
        -- Add "color correction" code
    elseif game.Lighting:GetMinutesAfterMidnight() == 6 * 60 then
        -- Runs when TimeOfDay gets to 6 in the morning     
        -- Add "color correction" code
    end
    wait(0.1)
end

If this works please give a upvote and accept the answer!

Reference material: ROBLOX Wiki Article

0
Thanks so much and Color Correction - You can add it to lighting right click lighting and click it and view it in properties but this works! Thanks Tsb102403 -9 — 7y
0
Oh you mean that lol, never used it before. Warfaresh0t 414 — 7y
0
lol thanks this works to Tsb102403 -9 — 7y
Ad

Answer this question