Hello,
As from my last post, I have been able to make a script that allows the door that I'm working on to move up and down from the click of a button. The only issue I have now is that upon pressing the button, the door will rotate 90 degrees, making it look weird and out of place.
I've also had a lot of issues with this in the past, yet just scrap the idea as I can never figure out a way to fix this.
local LeftDoor = script.Parent.Parent.Parent.LeftOfficeDoor
local RightDoor = script.Parent.Parent.Parent.RightOfficeDoor
local Sound = script.Parent.Sound
local debounce = false
local door = false
local Rotation = LeftDoor.CFrame - LeftDoor.Position
script.Parent.ClickDetector.MouseClick:connect(function()
if not debounce then debounce = true
if not door then door = true
Sound.Playing = false
Sound.Playing = true
for i = 1,14 do
LeftDoor.CFrame = CFrame.new(LeftDoor.Position + Vector3.new(0,1,0))
wait()
end
debounce = false
else if door then door = false
Sound.Playing = false
Sound.Playing = true
for i = 1,14 do
LeftDoor.CFrame = CFrame.new(LeftDoor.Position - Vector3.new(0,1,0))
wait()
end
debounce = false
end
end
end
end)
The door works perfectly fine, its just the rotation. I have seen many forms about this, yet the explaining on them is very little and I have no idea where to place them into my script.
If anyone could help, it would be greatly appreciated.

4 comments
I had just done this before you posted it and it works, so thanks anyway!
aw thanks for excepting my answer anyways :D Have a good day!
oh darnit i did the thing wrong though :/
oh darnit i did the thing wrong though :/