Delete Attribute
Remove a specific attribute from a Roblox instance. This operation is permanent until the attribute is re-added.Parameters
Roblox instance path using dot notation (e.g.,
"game.Workspace.Part")Name of the attribute to delete
Response
Returns confirmation object:Example Usage
Delete Single Attribute
Clean Up Multiple Attributes
Batch Delete Across Instances
Use Cases
Schema Migration
Remove deprecated attributes when migrating to a new configuration system.Clean Up Test Data
Delete temporary attributes added during development or testing.Reset Configuration
Clear specific configuration values to restore default behavior.Memory Optimization
Remove unused attributes to reduce instance memory footprint (minor optimization).Version Upgrades
Delete obsolete attributes when upgrading game versions or refactoring systems.Workflow Example
Migrating Weapon System
Attribute Change Detection
In Lua, deleting an attribute fires theAttributeChanged signal:
Safety Considerations
- No undo: Once deleted, attributes can only be restored by setting them again
- No warning: Deleting a non-existent attribute does not throw an error
- Script dependencies: Ensure no scripts depend on the attribute before deleting
- Replication: Deletion replicates to clients automatically
Error Handling
- Throws error if
instancePathis invalid or instance doesn’t exist - Does NOT throw error if attribute doesn’t exist (idempotent operation)
- Returns success even if attribute was already absent
Verification
Verify deletion succeeded:Related Tools
Get Attribute
Read a single attribute value
Set Attribute
Set or update an attribute value
Get Attributes
Get all attributes on an instance
Alternative: Clearing Values
Instead of deleting, you can set attributes to default values:- The attribute schema is changing
- The attribute is no longer needed
- You want to reduce attribute count
- Scripts check for attribute existence
- You want to preserve the attribute definition
- Default value has semantic meaning
Notes
- Deletion is immediate and permanent (until re-added)
- Fires
AttributeChangedsignal in Lua scripts - Does not affect properties (only custom attributes)
- Replicates automatically from server to clients
- Does not trigger undo history (cannot be undone with Ctrl+Z)