isObjectBreakable
Client-side
Server-side
Shared
Pair: setObjectBreakable
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
This function checks if an object / model ID is breakable.
OOP Syntax Help! I don't understand this!
- Method:object:isBreakable(...)
- Variable: .breakable
Syntax
bool isObjectBreakable ( object theObject / int modelId )Required arguments
- theObject / int modelId: MISSING_PARAM_DESC
Returns
This example creates an object when the resource starts and checks if the object is breakable.
- bool: value
Code Examples
shared
This example creates an object when the resource starts and checks if the object is breakable.
addEventHandler("onClientResourceStart", resourceRoot, function() local object = createObject(1337, 5540.6654, 1020.55122, 1240.545) if isObjectBreakable(object) then outputChatBox("Yes, the object is breakable.") else outputChatBox("No, the object is not breakable") endend)