get location||doc135436

September 20, 2022

Format

 Object:getPosition() 
  • The class to which the function belongs:Object

Description

Get the current location coordinates.


Precautions

  • The obtained position coordinates are of decimal type

Value Returned

type Description
Vector3 Position coordinates


Code Samples

on the client side of the objectmount script, get the object to get the current position coordinates

local pos = this:getPosition()     --Get the current position of the object