respawnObject
Client-side
Server-side
Shared
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
This function respawns a specific object.
OOP Syntax Help! I don't understand this!
- Method:object:respawn(...)
Syntax
bool respawnObject ( object theObject )Required arguments
- theObject: an object element
Returns
This example prevents objects from despawning. When an object breaks, it gets respawned right away.
- bool: value
Code Examples
shared
This example prevents objects from despawning. When an object breaks, it gets respawned right away.
addEventHandler ( "onClientObjectBreak", getRootElement(), function () respawnObject ( source ) end)