Few questions about CFrame, lookvector, Unit, Vectors

Hello, so I was wondering, so I script a lot of stuff, but, the part, that, it’s really difficult for me, is look vector, cframe, Unit and vectors, so I know Vector could be position or orientation, CFrame is like a ‘Combination’ of position and orientation, and I do not know what’s unit.
Also What is CFrame:lerp() ?
I got other questions as, does Arms and stuff, has like 'Waist" or something for I can move them? Or I have to create motors and stuff

I do not understand how to calculate, it’s really complicated, like, there is such a lot of functions from CFrame

THE worst part, is that I speak spanish, so it’s kind of difficult to understand sometimes

What I mean, is that I do not know how to calculate, for example, like in weapons, arms point where mouse is at, IDK how do it!

If you can help me understand how to calculate, and some examples but really basic, for I can understand it! For example, I tried to make this:

PlayerFromSeat.Character.HumanoidRootPart.Position = PlayerFromSeat.Character.HumanoidRootPart.Position + Vector3.new(-5,1, 0)

but

how can I make this work, to make, if you’re in left seat, TP’s you to left, if you’re on right, TP’s you to right
example of how it works:
https://gyazo.com/63be0474fd0d43ccf02c6aed48df8415
it should teleport you to the left of - 5 of the X, and +1 for the Y axis, but well, not working as expect, how can I make player get’s teleported to the seat CFrame but left if left, or right if right :confused:

Thank you

:heart:
sorry about a lot of questions

Well your question is kind of a mess and you keep switching topics so I am going to answer your title only.

LookVector is a vector that describes the forward direction of a CFrame. Generally it is 0, 0, -1.

A unit vector is a vector divided by its own magnitude. Unit vectors always have a length of one.

Yes but, what face of cdrame? like, the front face would be forward direction?

Yes, that would be correct. LookVector is 1 stud in front.

1 Like

Do you know what’s CFrame.Angles?
CFrame | Documentation - Roblox Creator Hub What can it be used for?
Like the explanation is, complicated
Creates a rotated CFrame using angles (rx, ry, rz) in radians. Rotations are applied in Y, X, Z order.

1 Like

Well most of this is just matrix math. It is not a Roblox-only thing. I don’t know a lot about matrixes so you might want to search around.

I found this, I hope that helps you understand cframe in general a bit better.

1 Like