Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

My script is not working even though there are no errors. Any help?

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

1 answer

✓ Accepted answer

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().

This discussion is preserved as it was. New answers, comments, and votes are closed.