Invalid argument #3(CFrame Expected, got Vector3)

I’m trying to make a car exit script that when you press F it moves your humanoid root part to the look vector and multiplies it by 15, but it doesn’t seem to be working.

This is my current script

rootPart.CFrame = rootPart.CFrame.LookVector * 15
1 Like

Reference the rootPart.CFrame as it’s Position instead if you only want to move it

rootPart.Position = rootPart.CFrame.LookVector * 15

LookVector is a Vector3 Value

Try doing something like this.

local lookVector = rootPart.CFrame.LookVector * 15
rootPart.CFrame = CFrame.new(lookVector.x, lookVector.y, lookVector.z)

Howdy, how are you doing?

Try this:

rootPart.Position = rootPart.CFrame + rootPart.CFrame.LookVector * 15
1 Like