CFrame Angle Help

I have clone.PrimaryPart.CFrame = CFrame.new(H.Position)
When it clones, the gun faces into weird positions, may I ask if there’s a way to set the new CFrame with it facing the correct direction?
NVIDIA_Overlay_JxcgfxoN9D

1 Like

This is a for loop that sets it^

1 Like

Maybe you could use :PivotTo() instead of model.PrimaryPart.CFrame?

--example:
clone:PivotTo(CFrame.new(H.Position));

That wouldn’t change the direction that the gun will be facing tho.

1 Like

Oh wait, you didn’t specify a rotation in CFrame.new(H.Position) because it only returns the Vector3 space and no rotation.

image
And you end up with no rotation.

I see, is it possible if I set look at to a part and the gun will face toward it?

That should work, try creating the CFrame by doing CFrame.new((your position), (your position) + Vector3.new(0,0,5))

Should force it to look along the z axis, not entirely sure tho. It’ll definitely align all of them in a specific direction however

Yeah how do you set all of them to face the same direction (To the left)

you can try adjusting the Vector3 in the 2nd parameter of my example to point them in the proper direction (left/right is relative, so I’m not sure what the proper direction is for your case)