Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to rotate a welded part?

	local HORN  = script.Horn:Clone()
	HORN.Parent = workspace
	HORN.Orientation = Vector3.new(-50.33, -87.83, 0)
	local hornWeld = Instance.new("Weld")
	hornWeld.Parent = workspace
	hornWeld.Part0 = c.Head
	hornWeld.Part1 = HORN
	hornWeld.C0 = CFrame.new(.08,.6,.6)        

The weld works correctly but the horn isn't rotated as i want it to be like, how do you rotate the horn even tough it's in a weld?

1 comment

0

CFrame * CFrame.Angles()

1 answer

✓ Accepted answer

CFrame.Angles() is what you're going to want.

When you're setting the hornWeld.C0 add * CFrame.Angles() and set x,y,z values to what you'd like

hornWeld.C0 = CFrame.new(.08,.6,.6) * CFrame.Angles(0,math.rad(90),0)

This discussion is preserved as it was. New answers, comments, and votes are closed.