I've been trying to make a space game, but the problem is that when I want to move my ship I just use .lookVector
to get my velocity. But in order to use that to go left, is a problem. Anyone know a way to do this?
✓ ANSWER ACCEPTED
How to get the CFrame.lookVector to the left, instead of from the front?
1 answer
✓ Accepted answer
Rotate the CFrame counterclockwise along its Y (vertical)-axis by 90 degrees, then get its .lookVector:
local part = script.Parent
local pushdirection = (part.CFrame * CFrame.Angles(0, math.pi/2, 0)).lookVector -- Gets the part's CFrame, rotates it 90 degrees (math.pi/2 radians) counterclockwise along its Y-axis so that faces the left, and then gets its lookVector.
local pushvelocity = 400
part.Velocity = pushdirection * pushvelocity
This discussion is preserved as it was. New answers, comments, and votes are closed.

5 comments
It works! Thanks.
Could you not just get the rotational part of the CFrame and multiply it by Vector3.FromNormalId(face), where face is the NormalId Enum for the surface of a brick?
That wouldn't give the correct result. Yours would be the same as moving the part to (0, 0, 0) while keeping the rotation, and translating it one stud to its left. The front of the part would still be facing the same direction (and therefore the lookVector wouldn't change).
If you want to use NormalIDs, CFrame.new(part.position, ( part.CFrame * CFrame.new(Vector3.FromNormalID("Left") ) ).p).lookVector should give the same result.
Thanks