getElementPosition
Shared
Reads an element's position in the world.
vec3|false getElementPosition(element element)
Parameters
| Name | Type | Description |
|---|---|---|
| element | element | The 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))