I tried making a script using BodyPostion which selects all the parts of a door and moves them to a different position to make it a sliding door. However, when it tries setting the BodyPostion it doesn't work and nothing happens.
local door = script.Parent.Parent.Model:GetChildren()
script.Parent.ClickDetector.MouseClick:Connect(function(Onclick)
for _,part in pairs(door) do
local yPosition = part.Position.Y
local zPosition = part.Position.Z
part.CanCollide = false
part.BodyPosition.Position = Vector3.new(-24.325,yPosition,zPosition)
end
end)
