How do I make the character stay in air and face towards the mouse constantly with Force Constraints?

  1. What do you want to achieve?
    How do I make the player stay in the air, then make their body face the mouse. I don’t want to manually set cframe as this has caused me lag problems and choppy problems.
    What I want to achieve

  2. What is the issue?
    I got the goal where the object stays still, but I can’t seem to get the goal where the object faces towards the other object constantly.
    Example: What I tried

  3. What solutions have you tried so far?
    I tried using the Force Constraints which I am new to, but i’m still confused (I used Align Orientation and Linear Velocity). I heard that AlignOrientation is a replacement for BodyGyro, but I don’t think that’s entirely true as the object only copies the other objects rotation, not facing towards the other object.

Here’s what I used:




Change the mode of AlignOrientation to OneAttachment. Then set the CFrame.

I got it where it faces one way, and when I rotate the attachment it rotates accordingly and that way constantly. Are you saying to set the cframe of the attachment repeatedly in a loop of the mouse position?

No. If you’re familiar with BodyGyro, it has a property called CFrame. For compatibility reasons, AlignOrientation also has this, so you don’t need to set the attachment CFrame separately.

ohhh so i would just set the align orientation cframe as the look vector of mouse?

Yes, but you can’t just do that. Just set the CFrame to workspace.CurrentCamera.Focus and it should work.

im confused, why would i do that and on a server or local script? or both?

You should be doing that on a local script.

but if i do it local then the turning wont be displayed for others?

it will display for others if it has the same network owner.

what does that mean? and would i need to set that?

no. You can use the code just as it is.