#Night Light Settings

34 messages · Page 1 of 1 (latest)

lofty plank
#

Here

#

Im here

upbeat plank
#

here some pics

lofty plank
#

Ok

upbeat plank
#

i have to update my drive to put screenshots and that would take 15 miunites

lofty plank
#

Alr

upbeat plank
#

so we can just discuss it

#

so there are 2 settings and one is sunrise/sunset and midnight

lofty plank
#

Ok

upbeat plank
#

the game current setting is sunrise

lofty plank
#

Ok

#
local RunService = game:GetService("RunService")
local Lighting = game:GetService("Lighting")
local lightsettings = Lighting.LightingSettings

local night = workspace["Lighting Sets"].Night


local function updateTime()
    local currentTime = Lighting.ClockTime
    local timeInterval = 0.05
    local newTime = currentTime + timeInterval
    Lighting.ClockTime = newTime
    
    if Lighting.ClockTime == 18 then
        lightsettings:Apply(night)
        print(Lighting)
    end
end


RunService.Heartbeat:Connect(updateTime)
upbeat plank
#

and when it turns 18 on the clock. The setting should change into midnight mode

#

but it doesn't work

lofty plank
#

Try to make it

#
local RunService = game:GetService("RunService")
local Lighting = game:GetService("Lighting")
local lightsettings = Lighting.LightingSettings

local night = workspace["Lighting Sets"].Night.Value


local function updateTime()
    local currentTime = Lighting.ClockTime
    local timeInterval = 0.05
    local newTime = currentTime + timeInterval
    Lighting.ClockTime = newTime
    
    if Lighting.ClockTime == 18 then
        lightsettings:Apply(night)
        print(Lighting)
    end
end


RunService.Heartbeat:Connect(updateTime)
#

Try this

upbeat plank
#

not even print works

lofty plank
#

Oh

#

What is :Apply stands for??

upbeat plank
#

applying the setting to the light settings

#

changing it

lofty plank
#

I dont think there is something called Apply

#

Oh its a module

#

Sorry

upbeat plank
#

it is a script

lofty plank
#

Can you show the module

#

Send it here

upbeat plank
#

?

#

there is no module script

lofty plank
#

Bro you did a script with nothing to support with and you think it will work?

upbeat plank
#

i mean the day cycle works is just the setting

#

?

#

yo