script:
local door = script.Parent
--position before moving = 61.595, 3.5, -123.086
--position after moving = 65.779, 3.5, -121.335
--rotation before moving = 0, 0, 0
--rotation after moving = 180, 50, 180
--have no clue what im doing rn v
function doormove(onClick)
for x = 61.595, 65.779, .4 do
for z = -123.086, -121.335, .2 do
workspace.Model:SetPrimaryPartCFrame(CFrame.new(x, 0, z))
for h = 0, 180, 20 do
for e = 0, 50, 5 do
for y = 0, 180, 20 do
workspace.Model:SetPrimaryPartCFrame(CFrame.Angles(h, e, y))
end
end
end
end
end
end
script.Parent.ClickDetector.MouseClick:connect(doormove)
when i click it lags the server and it disappears
i want it to swing open like a normal door but when i click it just disappears. i used to have just one brick and the center would swing, but the primary part of the model is on the side of the door as the center for the moving.
