Best Practices
Follow these guidelines to get the most out of Revix.
Project Organization
Use Clear Naming
Good script names help Revix understand your code:
Good:
PlayerDataHandlerCombatSystemInventoryManager
Avoid:
Script1Handlertemp
Organize Your Scripts
Keep related scripts together:
ServerScriptService/
├── Game/
│ ├── RoundManager
│ └── GameConfig
├── Player/
│ ├── PlayerManager
│ └── DataStore
└── Combat/
├── DamageHandler
└── WeaponManagerUse ModuleScripts
Modular code is easier for Revix to understand and modify:
-- Good: Self-contained module
local HealthModule = {}
function HealthModule.damage(player, amount)
-- implementation
end
function HealthModule.heal(player, amount)
-- implementation
end
return HealthModuleCommunication Tips
Describe the Goal, Not Just the Task
Less effective:
"Add a variable"
More effective:
"I need to track how many coins each player has collected during this round"
Reference Existing Code
Use file mentions to give Revix context:
"Use the same pattern as in @ReplicatedStorage.Utilities for this new function"
Ask for Explanations
Learn while you work:
"Create a debounce function and explain how it prevents spam clicking"
Working with Generated Code
Review Before Applying
Always review AI-generated code:
- Check for correct Roblox API usage
- Verify variable names match your conventions
- Ensure it fits your existing architecture
Test Incrementally
Don't apply all changes at once:
- Apply one change
- Test in Studio
- Move to the next change
Keep Backups
Enable version history in Roblox Studio:
- File → Save to Roblox
- Use Team Create for automatic backups
- Consider local file backups for major changes
Performance Considerations
Avoid Repeated API Calls
Let Revix know about performance requirements:
"Create a caching system to avoid repeated GetService calls"
Specify Constraints
Be clear about limitations:
"This needs to handle 50 players simultaneously without lag"
Security
Review Sensitive Code
Pay extra attention when dealing with:
- Data stores
- Remote events
- Purchase handling
- Admin commands
Validate User Input
Ask Revix to include validation:
"Create a trade system with validation to prevent exploits"
Getting Help
Read Error Messages
Copy the full error message to Revix:
"I'm getting this error: [paste error] - Can you help me fix it?"
Share Context
If something isn't working:
"I expected X but got Y. Here's what I've tried..."