In detail, I want to enable a PointLight I inserted into a Part based on what the time it is in the game. My goal is to have PointLights around my place enabled throughout the time of night in the game. Can someone please help me, I'm very rusty and I know this is a simple task. All help is appreciated.
pLight = game.Workspace.Light.PointLight ToD = game.Lighting.ClockTime if ToD == 13 then pLight.Enabled = true end
pLight = game.Workspace.Light.PointLight ToD = game.Lighting.ClockTime if ToD == 13 then pLight.Enabled = true end
that will only run once
do
local time = game.Lighting.ClockTime time.Changed:connect(function(OMGGG) if ToD == 13 then pLight.Enabled = true end end)
this script runs the if statement when ClockTime is changed