Deletes a Roblox instance from the game by callingDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/nnaridz/RbxGenie/llms.txt
Use this file to discover all available pages before exploring further.
:Destroy() on it. The object and all its descendants are permanently removed.
Endpoint
Parameters
The path to the instance to delete (e.g.,
"game.Workspace.Part").Optional parameter (currently not used in implementation, but reserved for future use).
Response
Returns
true if the object was deleted successfully.Error message if the operation failed. Possible errors include:
- Invalid path resolution
- Attempting to delete protected instances (game root or Workspace)
Examples
Delete a Part
Delete a Folder and Its Contents
Delete a Script
Error: Protected Instance
Error: Invalid Path
Notes
- The deletion is permanent and cannot be undone
- All descendants of the deleted object are also destroyed
- You cannot delete the game root or Workspace for safety
- The object is removed using the
:Destroy()method, which sets Parent to nil and locks the Parent property