✓ Accepted answer
LookVector, RightVector and UpVector
UpVector returns a direction facing upwards of a CFrame, RightVector returns a direction facing the right of a CFrame, and LookVector returns a direction facing forwards of a CFrame.
These are returned as Vector3's and are normalized, meaning that they have a magnitude approximately equal to 1; have used .Unit on them
These can be used for:
Propelling a character forwards:
Suppose you want a player to propel themselves forward or in any other direction with a small force. You can use:
local bv = Instance.new("BodyVelocity")
bv.Velocity = player.Character.HumanoidRootPart.CFrame.lookVector * 50
bv.MaxForce = Vector3.new(1, 1, 1) * math.huge
bv.Parent = player.Character.HumanoidRootPart
game:GetService('Debris'):AddItem(bv, 1)
1 comment
because directional unit vectors aren't meant for use for positions