getObjectScale
Client-side
Server-side
Shared
Pair: setObjectScale
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
This function returns the visible size of an object.
OOP Syntax Help! I don't understand this!
- Method:object:getScale(...)
- Variable: .scale
Syntax
float, float, float getObjectScale ( object theObject )Required Arguments
- theObject: the object you wish to return the scale of.
Returns
- float: x
- float: y
- float: z
Code Examples
shared
This example adds a command namedgetscalewhich creates an object and prints out the scale of it.
addCommandHandler("getscale", function() local theObject = createObject(1337, getElementPosition(localPlayer)) local x, y, z = getObjectScale(theObject) outputChatBox("Object scale: X: "..x..", Y: "..y.." Z: "..z.."") end)