So I am new to Vector3, I know it is a coordinate system, but how does that correlate with the player’s position in the workspace. In other words, how does one find the exact coordinate of oneself within a world? Much help is greatly appreciated!
heres a example of what you want to do
function findPlayer() local playercframe = game.Workspace.bootsareme.HumanoidRootPart.CFrame print(playercframe) end
I’ll try to explain it the best I can.
Vector3 describes a vector in 3D space, typically usually used as a point in 3D space or the dimensions of a rectangular prism. (from the Roblox Developer Api)
There is an infinite amount of 3D points in a Roblox game. When a new part is created, the game finds the exact middle point of the part and that becomes the part’s Position property. The Position, Rotation, and Size of a part are represented using Vector3. Vector3 can also be used to change said properties of parts.
So, if you wanted to find the player’s “middle point”, you can find the HumanoidRootPart of the player, and then take the Vector3 value of its Position. This can be found using CFrame.
(see the post above)
Since you’re finding the middle of a player, you can manipulate this to change their position without killing them, as all players models are welded until death so it teleports relative to the part you’re moving.
I hope this gave you an in depth look into Vector3!