How to change orientation and keep the CFrame

Im trying to make a slash effect and I want the slash to go horizontal except whenever I try changing the Orientation it makes it face away from the player and its still vertical

		local b = game.ServerStorage.MoonCreschent:Clone()
		
		b.CFrame = character.HumanoidRootPart.CFrame * CFrame.new(0,0,-2)
		b.Orientation = Vector3.new(0,180,0)
		b.Parent = workspace

The issue:
image

How I want it to look
image

Try this:


b.CFrame = (character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -2)) * CFrame.fromEulerAnglesXYZ(0, math.rad(number), 0)

That makes it face behind me and its still vertical, how do i make it horizontal?
image

Change some of the numbers up

Change it to:

CFrame.fromEulerAnglesXYZ(math.rad(number), 0, 0)

Or

CFrame.fromEulerAnglesXYZ(0, 0, math.rad(number))

Or

Change to:

(character.HumanoidRootPart.CFrame * CFrame.new(0, 0, 2))

And so on

1 Like

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