Im trying to script a BodyGyro to make the characters body always face the direction of the mouse but when I use RunService to set the BodyGyros CFrame, it only sets once.
Your CFrame is off, it’s looking from Vector3.new(0, 0, 0) to the mouse, so it won’t change if you’re far from the world origin.
The CFrame should be from the character to the mouse to create the correct rotation:
CFrame.new(
character.HumanoidRootPart.Position * Vector3.new(1, 0, 1), -- Character position with 0 Y
Mouse.Hit.p * Vector3.new(1, 0, 1)) -- Mouse position with 0 Y
Strange, is the Humanoid.AutoRotate false? That may be fighting your BodyGyro.
Also are you 100% sure the BodyGyro isn’t updating? Try printing the BodyGyro.CFrame in your heartbeat event to make sure it is changing with the mouse.
Sorry I worded it weird earlier! I met that Humanoid.AutoRotate should be false while you try to control a character’s direction.
If that doesn’t work I don’t know what is keeping the BodyGyro from working. You could double check to make sure you are giving the right CFrame by setting the character’s CFrame directly instead.
Other than that I’m out of ideas, I hope you figure it out one way or another!
Hey so thanks for all the help but I finally realized the solution and honestly feel a bit dumb . I was trying to set the BodyGyros CFrame through the server using a remote event after passing through the Mouse, and since the event is only fired once, Mouse.Hit.p will always stay the same. So Im making and changing the BodyGyros CFrame through LocalScript now. But thanks again for all the help .