Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Cancollide = false on a specific time?

Asked by
Rdumb1 4
6 years ago
Edited 6 years ago

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?

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

2 answers

Log in to vote
0
Answered by 6 years ago

Don't use TimeOfDay use this instead:

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

This will keep the door open for 1 hour

Ad
Log in to vote
0
Answered by
Rdumb1 4
6 years ago

o. I just need to change the cancollide.

0
and to change timeofday to clocktime. Rdumb1 4 — 6y

Answer this question