Include a standalone, bare-bones rbxl file with only the code you want reviewed.
FireMagicTool.rbxl (30.0 KB)
(it does come with required stuff like save files and replication event)
Hold Q with tool out to shoot a fireball.
If it seems kind of glitchy, like how your character moves when starting the attack, don’t worry about it cause it works fine in the actual game.
Provide an overview of:
-
What does the code do and what are you not satisfied with?
How it’s incredibly bloated and messy. -
What potential improvements have you considered?
Moving stuff over to replicatedfirst and have it replicate from there would lower lag upon the tool being given to player, but it will make the game even more messy and complicated. I have also thought about making everything a local script but I don’t actually know how to go about using them in a way that will be clean and easy to work with. -
How (specifically) do you want to improve the code?
Make it cleaner, make it more efficient, leave it easy to add to for the future. More specifically, I would like to quickly be able to modify stuff on the spot (Such as attack behavior and visual effects) without having to completely rewrite large chunks of code. I wanted to be as simple and easy to add to for the future but this more or less backfired. I don’t know what to do now and I don’t really want to have to come up with another solution only to have it backfire again.
If anything’s unclear or needs clarification, please reply. I tried to include readme’s inside of the tool but I do realize they may not be sufficient for just how bad it is. Also please keep in mind that I am by no means an expert scripter, so if you find something that looks weird it’s probably not by choice but by me not knowing that there’s a better way to do it, so telling me about it would be greatly appreciated.
edit:Clarity