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

How do I make a sliding door open at a certain time?

Asked by 4 years ago

So.... I am trying to make a sliding door open, but at a certain time. I've tried so many YouTube tutorials, and they don't help me one bit. It only shows it opening when you come upon them. What I am looking for is when a certain amount of time is reached, I want the doors to open. How do I do this?

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

Use if statements

local timer = 120

while true do
    if timer == 120 then
        DoorFunction()
    end
    wait(1)
end

Timer would be replaced with whatever number you’re using, DoorFunction can either be a separate function or lines of code inside the if statement.

Ad

Answer this question