Matching Orientations of Two Parts with Align Orientation

Ive been struggling with Align Orientation for the past couple hours and was wondering if anyone knew a working way of matching two Parts orientations.

These are screen shot of what ive got so far seems to be free in the Y axis but locked in the others:

facing forwards:
orien1

facing backwards:
orient2

2 Likes

Is the duck welded on the hand or how does it stay there?

1 Like

It uses a Align Position instance to position. Probably should have clarified that.

1 Like

if you wanna match the ducks orientation so some target part can’t you do

local TargetRotationX,TargetRotationY,TargetRotationZ = somepart.CFrame:ToEulerAnglesXYZ()

duckObject.CFrame = CFrame.new(duckObject.CFrame.Position) * CFrame.fromEulerAnglesXYZ(TargetRotationX,TargetRotationY,TargetRotationZ)

I was just kind of looking for a way involving Align Orientation as im already sending like 5 values through a remote event and dont want to send another and Align Orientation changes the orientation on both Client and Server simultaneously.

1 Like

Okay so for align orientation how is it currently setup?

1 Like

I was actually using a BodyGyro instead of an AlignOrientation, didnt realize I was putting Align Orientation. Im tired lol

Its simply just setting the Body Gyro’s parent to the duck which has gaven this result.

Oh okay so on the server just change the body gyros cframe to the cframe of the target part or the part you want the duck to match the rotation with

1 Like

Body Gyros CFrame will always adjust to there parents so you dont have to set the Position at all.

1 Like

Oh if you refer to .CFrame in the body gyro to the target parts Cframe rotation you want to match .Position is ignored, it should only take into account the rotational axes therefore matching the rotations

1 Like

I fixed it by using a Align Orientation and Orientating it through the client and then updating it to the server.

1 Like

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