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

Cancollide = false on a specific time?

So I was trying to make a door that would be closed on a specific time but it doesn't work with this script, please help?

if game.Lighting.TimeOfDay == 06:00:00 then
	script.Parent.CanCollide = true
end

2 answers

✓ Accepted answer

Don't use TimeOfDay use this instead:

if game.Lighting.ClockTime >= 6 and game.Lighting.ClockTime <= 7 then
    script.Parent.CanCollide = false
end

This will keep the door open for 1 hour

o. I just need to change the cancollide.

1 comment

0

and to change timeofday to clocktime.

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