Changing bodygyro doesnt work properly using a script

alright so uh, here’s a clip:

External Media

changing the y value to 40 will have the bodygyro’s Y value also at 40, but if i change both the X and Y value, then the bodygyro’s values become a mess.

here’s the code:

funnything=script.Parent.Parent
while true  do
	wait()
	script.Parent.CFrame= CFrame.Angles(math.rad(funnything.Y.Value), math.rad(funnything.X.Value), math.rad(0))
end

can someone explain why that happens and how i can prevent that?

it’s deprecated please use Align Orientation instead :wink:

Try using CFrame.fromOrientation instead of CFrame.Angles, the order of operations the angles are applied is different and can end up with vastly different end results.

1 Like

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