I am trying to get the door to slide down .
DoorSystem = script.Parent --The Model
Door = DoorSystem.Door1 --The Door's Name
DoorPad = DoorSystem.DoorPad1 -- The Door Pad
local padPressed = false --Do not touch this variable
function Slide()
if not padPressed then
padPressed = true
for i = 1, 85 do --Keep on changing the number 31 until the Part goes in properly.
Door.CFrame = Door.CFrame + Vector3.new(0, 0.1, 0)
wait()
end
wait(3)--Play around with this until it works
padPressed = false
if padPressed then
for i = 1, 85 do
Door.CFrame = Door.CFrame - Vector3.new(0, -0.1, 0) --I am trying to get it to slide down
end
end
end
end
DoorPad.Touched:connect(Slide)
