setObjectScale
Client-side
Server-side
Shared
Pair: getObjectScale
This page is incomplete! Help wanted!
Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.
This function changes the visible size of an object.
Note
setObjectScale does not affect the collision models for the object, as such is unsuitable for use for interaction with players, vehicles or other objects.
Syntax
setObjectScale ( )Code Examples
server
-- Get the position of the player
local x, y, z = getElementPosition(localPlayer)
-- Create the object
local antennaObject = createObject(1595, x + 2, y, z)
if antennaObject then -- If it was created -- Set the scale to half the normal scale
setObjectScale(antennaObject, 0.5)
-- Remove the collision
setElementCollisionsEnabled(antennaObject, false)end