I am currently working on an Anime RPG game that uses the idea of “classes” with multiple abilities. One of the challenges I have faced as a Scripter is trying to keep my Client Side of my code clean and organized and easy, fast to edit.
This is how my LocalScripts are structured:
[ Variable Referencing / Services ]
[ KeyCode R ] (For PC)
[ KeyCode ButtonY ] (For Xbox)
[ MouseButton R ] (For Mobile)
(then repeat for all the other keys/abilities)
Each KeyCode or MouseButton has 20 - 30 lines of code depending on the ability, (Yes I am using FE lol.) and your “classes” has like 5 - 6 moves you end up with hundreds of lines of horrid code. It has been VERY annoying to work with it and you have to do mindless scrolling to fix something very minimal, is there any way I can merge all these functions for different platforms into just 1 single function?