Skip to main content

Documentation 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.

Deletes a Roblox instance from the game by calling :Destroy() on it. The object and all its descendants are permanently removed.

Endpoint

delete_object

Parameters

path
string
required
The path to the instance to delete (e.g., "game.Workspace.Part").
force
boolean
Optional parameter (currently not used in implementation, but reserved for future use).

Response

ok
boolean
Returns true if the object was deleted successfully.
error
string
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

{
  "path": "game.Workspace.Part"
}
Response:
{
  "ok": true
}

Delete a Folder and Its Contents

{
  "path": "game.ReplicatedStorage.OldAssets"
}
Response:
{
  "ok": true
}

Delete a Script

{
  "path": "game.ServerScriptService.ObsoleteScript"
}
Response:
{
  "ok": true
}

Error: Protected Instance

{
  "path": "game.Workspace"
}
Response:
{
  "error": "Cannot delete root or Workspace"
}

Error: Invalid Path

{
  "path": "game.Workspace.NonExistent"
}
Response:
{
  "error": "Invalid path: game.Workspace.NonExistent"
}

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