Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make a door open and close??

I cant fine out how, can someone please help, i looked it up and i cant find anything so please help someone!

1 answer

Here is a line of code that will do it:

local Door = game.Workspace.Door
local Open = false
local Button = game.Workspace.OpenButton.ClickDetector
 ClickerDetector.MouseClick:connect(function()
  if Open == false then
   Open = true
    Door.Transparency = 0.5
    Door.CanCollide = false
else
  Open = false
    Door.Transparency = 0
    Door.CanCollide = true
end

This discussion is preserved as it was. New answers, comments, and votes are closed.