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 10 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 10 years ago
--Simple Version
local ting = 0
function OnCLick()
if ting == 0 then
ting = 1
game.Workspace.Door.CanCollide = false
wait(2)
game.Workspace.Door.CanCollide = true

local ting  = 0
end
end

script.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