Help rotating a part

I’ve made a hair-changing system and I need to find a way to rotate the part 180 degrees.

I’ve tried rotating the physical parts but nothing happens, and I’m currently un-educated on how to rotate parts.

I’m up for any suggestions you have.

game.ReplicatedStorage.Events.HairEvents.HairEvent1.OnServerEvent:Connect(function(player)
	local Hair = game.ReplicatedStorage.Hair.Hair5:Clone()
	local Folder = player.Character.Head:WaitForChild("Hair")
		Hair.Parent = Folder
		Hair.HairAttachment.Position = player.Character.Head.Position
		Hair.Position = Hair.HairAttachment.Position
		Hair.Name = "PlayerHair"
	local Weld = Instance.new("Weld")
		Weld.Parent = Hair
		Weld.Part0 = player.Character.Head
		Weld.Part1 = player.Character.Head.Hair.PlayerHair
		Weld.C0 = CFrame.new(0.05,0.2,0)
		Weld.C1 = player.Character.Head.HairAttatchment.CFrame
end)

That’s the code for the hair system, I’m still planning on adding more.

1 Like

You have to reverse the CFrame’s orientation through the weld you are creating. (using the C0 or C1 properties)

I made a post asking how to achieve something like this a couple years ago and @sjr04 provided quite a helpful solution:

1 Like

* CFrame.Angles(0, math.pi, 0)

Assuming you want to rotate something 180 degrees around the Y-axis.