Forward version of the XVector?

Hello, I am creating a dodge script that makes the character dodge based on the Camera. I currently have everything all set except for the forward and backward dodge.

My right dodge utilizes CFrame.XVector and my left dodge utilizes its negative.

How do I get the forward version of the XVector from my camera? If I utilize LookVector, the dash will go forward based on the camera whereas I want it to only do a flat version of it.
08qrbDAS4Z

Just remove the Y component

(Camera.CFrame.LookVector * Vector3.new(1, 0, 1)).Unit

thanks bro. btw what is Unit?

It turns the vector into a unit vector (length 1)

For example

Vector3.new(5, 0, 0).Unit --> Vector3.new(1, 0, 0)

Vector3.new(0.1, 0, 0).Unit --> Vector3.new(1, 0, 0)
1 Like