How do I make it so the players character follows the mouse when flying

Alright so I have a flying system that uses bodyvelocitys, However it locks the players mouse to the middle of the screen, which is why I need the players character to follow his mouse, however im unsure of how to do that

1 Like

I used the Search tool up top with the term fly script follow mouse and found a couple of solved posts as well as other flying related posts.

I’m not sure that would help. He’s asking how to do it, telling him to “search” for it is like re-asking his question.

You should get the mouse position first, then use the CFrame’s lookVector value to calculate the direction

Would look something like this

local direction = CFrame.new(origin, mousePosition).LookVector

bodyvelocity.Velocity = direction

If you want it to go faster just do direction * speed

Note: not aure if this works since I wrote in on my phone.

2 Likes