How to change orientation of a model

The line model.Orientation = Vector3.new(0,90,0) only moves the PrimaryPart of my model. All the other parts in the model are disregarded, despite me having WeldConstraints.

Does anyone know why?

1 Like

Primary Part should be Part0 in all welds, change the Orientation of it instead of the model, pretty sure changing Orientation for the model messes pivot or something

1 Like
wait(3)

local model = script.Parent

for _, v in model:GetDescendants() do
	if v:IsA("WeldConstraint") then
		v:Destroy()
	end
end

for _, v in model:GetDescendants() do
	if v:IsA("Part") then
		local newWeld = Instance.new("WeldConstraint")
		newWeld.Parent = v
		newWeld.Part0 = model.PrimaryPart
		newWeld.Part1 = v
	end
end

model.PrimaryPart.Orientation = Vector3.new(0,90,0)

Still doesn’t work

You should use PivotTo() and CFrame

For example

model:PivotTo(model.PrimaryPart.CFrame * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.