M MY Multiplayer: Wiki
Side
Kind

getElementPosition

Shared

Reads an element's position in the world.

vec3|false getElementPosition(element element)

Parameters

NameTypeDescription
elementelementThe element to read.

Returns

A vec3 with the position, or false if the element has no position.

Example

local pos = getElementPosition(localPlayer)
outputDebugString(("You are at %.1f, %.1f, %.1f"):format(pos.x, pos.y, pos.z))

See also