The lighting properties are set to 11:59:57 but this script is not working. HELP!! here is the script-
if game.Lighting.TimeOfDay == "12:00:00" then script.Parent.Transparency = 0.5 wait(0.2) Transparency = 0.5 wait(5) script.Parent.CanCollide = false wait(0.2) CanCollide = false if CanCollide == false then print("CanCollide has been set to false.") end if Transparency == 0.5 then print("The baseplate is now transparent.") end end
You said the lighting properties are set to 11:59:57. That if statement only runs once. Even if the time changes in game, it won’t fire since it only checks one at the start of the game. You should check when it changes using Instance:GetPropertyChangedSignal()
.