set location||doc135435

September 20, 2022


  • The class to which the function belongs:Object


Set the location coordinates.


  • By setting the location by this method, the location of the server and the client will not be synchronized, that is, if the location is set on the server, the client cannot see the effect.


Variable name type Description
pos Vector3 Position coordinates

Code Samples

on the client side of the objectmount script, set it to the position point whose coordinates are (1,1,1)

local pos =, 1, 1)       --Create a new vector3
World.Timer(60,function()              --Start the timer and set the object position after 3 seconds
    this:setPosition(pos)              --Set object position