Trouble printing models orientation

I’m trying to get the orientation of a model, it says the orientation of said model is (0, -90, -180) in properties

but when I use

print(workspace.Wood_Fence3.WorldPivot.Rotation)

it just prints the following 0, 0, 0, 4.37113883e-08, -3.82137093e-15, -1, -8.74227766e-08, -1, 0, -1, 8.74227766e-08, -4.37113883e-08

I just need to get the Y Axis orientation of the model (the -90) but i cant figure it out, any help would be apreciated.

Thanks in advance.

1 Like

Im Pretty sure Rotation is just an untranslated CFrame

That’s a CFrame. .WorldPivot is a CFrame, and the .Rotation attribute just returns a copy of that without the position. You can use the :ToOrientation() method, which returns the XYZ angles in radians which you can then convert to degrees via math.deg

local x, y, z = workspace.Wood_Fence3.WorldPivot.Rotation:ToOrientation()
print(math.deg(x), math.deg(y), math.deg(z))
1 Like

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