Model's orientation isn't right when cloned and placed

Alright so i have a model setup like this:
image

but when i clone and place it using this code:

script.Parent.lts.OnServerEvent:Connect(function(player, pos)
	local Head = player.Character.Head
	local wall = game.ReplicatedStorage.Structures.DoorW:Clone()
	wall.Parent = workspace
wall.PrimaryPart.Orientation = Head.Orientation
	wall:MoveTo(pos)
end)

it ends up like this:
https://gyazo.com/feb31f8a28c231b6669fbdd6c31d2f1b

Instead of setting the Orientation and then using MoveTo, you might try using SetPrimaryPartCFrame and do both at once.

1 Like