My friend made this door a while ago and we still use it. he ended up quitting roblox and gave me his models but i cant figure out how to make it that it goes to the side instead of opening in a opening like a normal door but have no idea how to edit the script like that. Any possible way to do it where it goes to the side instead?
local Model = script.Parent
local Handler = Model:WaitForChild("Handler")
local Knob = Model:WaitForChild("Knob")
local ClickDetector = Knob:WaitForChild("ClickDetector")
local AngleIncrement = 10 --change this to whatever you want, its how fast the door swings open/close
local WhitelistGroupIds = {}
local Open = false
function OpenDoor()
for i=1, 360 / 4, AngleIncrement do
for _,v in pairs(Model:GetChildren()) do
if v:IsA("BasePart") then
v.CFrame = (Handler.CFrame * CFrame.Angles(0, math.rad(AngleIncrement), 0)) * Handler.CFrame:toObjectSpace(v.CFrame)
end
end
wait()
end
Open = true
end
function CloseDoor()
for i=360 / 4, 1, -AngleIncrement do
for _,v in pairs(Model:GetChildren()) do
if v:IsA("BasePart") then
v.CFrame = (Handler.CFrame * CFrame.Angles(0, math.rad(-AngleIncrement), 0)) * Handler.CFrame:toObjectSpace(v.CFrame)
end
end
wait()
end
Open = false
end
function OpenCloseDoor()
if not Open then
OpenDoor()
else
CloseDoor()
end
end
local debounce = false
ClickDetector.MouseClick:connect(function(plr)
if debounce then return end
debounce = true
if #WhitelistGroupIds > 0 then
for i=1, #WhitelistGroupIds do
if plr:IsInGroup(WhitelistGroupIds[i]) then
OpenCloseDoor()
end
end
else
OpenCloseDoor()
end
debounce = false
end)

2 comments
Well, I am going to assume that he is talking about the doors that open at an angle, not sliding doors, I prefer to use set primary part cframe and then rotate it. Look up model rotation on youtube, it should come up with some good results
Nah dude, he specifically said "not like a normal door"