Player being teleported to nan, nan, nan position when BodyGyro/AlignOrientation is added

i’m trying to make a super mario odyssey inspired movement system, and right now im trying the make the player face the direction they’re moving, but the BodyGyro/AlignOrientation (im writing it like that because i tried both) somehow teleports my player to nan, nan, nan whenever i stop moving, and when i start moving again the player comes back, and the player movement is also super laggy for some reason, and also jumping doesnt work either.
whenever i get rid of the BodyGyro/AlignOrientation, it stops doing this.

with BodyGyro/AlignOrientation

without BodyGyro/AlignOrientation

i’m not using Humanoid.AutoRotate because i want the player to turn around faster when changing directions (e.g. from moving forward to backward)

4 Likes

You should disable them when dashing, as player rotates to wrong position breaking entire script in your case, after dash enable them again

all of this happens before dashing tho

1 Like

this is because animation is removed when gyro is active, still disable it and then enable when ended

1 Like

alright so i started messing around and i found that the way i used to get the move direction wasnt really right, and when the player was idling it was returning nan, which caused the teleporting
i changed the way i got the move direction CFrame to this: CFrame.lookAt(humanoidMove, humanoidMove * 2) and i also increased the responsiveness of the AlignOrientation and turned on RigidityEnabled

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