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

How to make wall with timer that occasionally is open, and closes after certain time?

Asked by 2 years ago

So I want to make a wall that will be open for 30 seconds, and then be closed for 5 minutes or until the end of the game, how would I do this?

1 answer

Log in to vote
1
Answered by 2 years ago

Hi, this is how you would make one. feel free to change the wait times to work for you. But don't play around with the wait(2) Make sure you create a part and name it wall and insert a script here is the script:

wait(2)

    while true do

        wait(30)

    script.Parent.Parent.wall.CanCollide = true

    print("Wall closing")

        wait(300)

    script.Parent.Parent.wall.CanCollide = false

    print("Wall opening")

        wait(30)

    end

Hope this helps!!

0
bruh HeroFigo 81 — 2y
Ad

Answer this question