#How do I make a wall door

1 messages · Page 1 of 1 (latest)

toxic cradle
#

How do I make a wall door that will flip up when you press a booth button to open it then closes again once the button is pressed again?

uncut mauve
#

script

toxic cradle
#

local door = workspace.Door
local isOpen = false

local function toggleDoor()
if isOpen == false then
-- Open the door (change position or orientation)
door.Position = door.Position + Vector3.new(0, 5, 0) -- Moves door up
isOpen = true
else
-- Close the door
door.Position = door.Position - Vector3.new(0, 5, 0) -- Moves door down
isOpen = false
end
end

script.Parent.ClickDetector.MouseClick:Connect(toggleDoor)

desert wadi
#

i think the last line needs to be:

script.Parent.ClickDetector.MouseClick:Connect(toggleDoor())

polar merlinBOT
#

studio** You are now Level 1! **studio

desert wadi
#

not 100% sure tho

toxic cradle
#

I'm going to need a complete guide because I restarted the whole thing.

desert wadi
#

i cant help with that then

#

sorry

#

im not that experienced

toxic cradle
#

First I have them attached