Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to get only one position value from a part or another object?

Asked by 4 years ago
Edited 4 years ago

How to get only one position value from a part or another object?

Example code:

local part = game.Workspace.part
local x = part.Position

In this case, I will get all of the position, but what if I need the x position specifically?

1 answer

Log in to vote
0
Answered by
Velsity 218 Moderation Voter
4 years ago

You add your axis at the end of a position.

Example:

local part = game.Workspace.part local x = part.Position.X

This will give us the axis X value of the position.

0
Wow thanks for the quick respond :) AndriusTheGreat 140 — 4y
Ad

Answer this question