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

How do i make it when a player click a brick the door open?

Asked by 11 years ago

If a player click a button, then it opens and when the player get in, it will close.

1 answer

Log in to vote
0
Answered by 11 years ago
01--Simple Version
02local ting = 0
03function OnCLick()
04if ting == 0 then
05ting = 1
06game.Workspace.Door.CanCollide = false
07wait(2)
08game.Workspace.Door.CanCollide = true
09 
10local ting  = 0
11end
12end
13 
14script.Parent.ClickDetector.MouseClick:connect(OnCLick)

Put this script inside of the button with Click Detector

Create a block in workspace called Door Make sure its anchored

Ad

Answer this question