How can I make the player face the direction of the camera while swimming?

A system in my game seems to lock the player in one direction while swimming unless you use shiftlock, so i was wondering how can I could make the player face the direction of the camera while they are swimming.

I am not asking for a full script, I just need some guidance for this (CFrames confuse me)

Inside a RunService, detect if the humanoid state is swimming, then set the HumanoidRootPart’s CFrame to CFrame.new(humanoidRootPart.Position, HumanoidRootPart.Position + LookVector), get the LookVector from the CurrentCamera CFrame.

There was a bug with this that made it so if they look down or up they got flung, The solution to this problem is to not modify the X rotation.

1 Like

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