Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I make a character walk in the direction the camera is facing?

I know it requires a loop of :MoveTo(), but how could I use the direction of a camera to move the user forward?

1 answer

The Camera is an interesting Object, featuring many functions for problems like these. More specifically, what could help you is Camera.Focus, I believe. Represents the point the camera is looking at. Now, essentially you just have to use MoveTo as you stated to move to the Vector3 of Focus (which is a CFrame!)

There is an alternate method with Rays, and a few other alternate methods which work best in First Person View, but I assumed you use any view.

This discussion is preserved as it was. New answers, comments, and votes are closed.