When I use GetPivot() on the command line, the result returns at “0”; Look at the image below, the rotation of the Y Axis is 45°;
GetPivot returns the Pivot, not the WorldPivot. Check out the pivotOffset.
How do I get the spin then? I used
print(math.deg(game.Workspace.table:FindFirstChildWhichIsA(“BasePart”). PivotOffset.Y))
and the result remained 0
Well in this case you could just type print(table.WorldPivot)
Keeps returning 0
CFrame.Rotation
returns the CFrame w/ the position elements set to zero:
In other words you’re not pulling the vector3 you think are. You want CFrame:ToOrientation()
:
This however will return a tuple of three values that are in radians. So the final result you want will be:
local x, y, z = workspace.table.WorldPivot:ToOrientation()
print(math.deg(y)) -- this should print 45
You can return the Orientation of the primarypart of table.
table.PrimaryPart.Orientation = 0,45,0
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.