How would I go about making a custom movement system?

Hello all, I’ve recently been fiddling around with the idea of custom movement systems and I came up with this to give me a basic idea of what i’m doing:
customchartesting.rbxl (13.3 KB)

(main script is located in starterplayer)
I’ve been trying to fix an issue where the player won’t move according to the way the camera is facing, and I haven’t been able to figure it out. I would appreciate someone pointing me in the right direction because I am completely lost right now.

Simply convert camera’s lookvector to a unit direction and then adjust by the unit movement vector of the current keys pressed.

If you aren’t sure what I am talking about I will try to explain this more thoroughly when I get home.

I’ve been trying to do that, but I’m really lost on how to go about it. I haven’t done much math in scripting and i’m not the best at it.

If you want to make them walk around you can just do stuff like this

local xmult = 0
local zmult = 0
--when key is pressed (i.e. w)
xmult = 1

--when key is released (i.e. s)
xmult = 0 --or check if other key like w is still down

--movement function of choice
setmove((cam.rightVector*xmult+cam.lookVector*ymult)*Vector3.new(1,0,1)).Unit)

You can also try checking the default control script.

4 Likes

Tysm! I didn’t know it was this simple.