Hello!
I have been doing a ton of research into the world of Roblox coding recently and after two failed attempts at making a game, I realized that my state systems were either way too simple, to the point that they were impossible to fix if something went wrong, add new features, or some times I would get confused by the code since it was connected to almost everything; or my systems were underdeveloped and lacked the necessary features or functions to run properly. I do understand the concept of the states should not be changed by the client and instead the client should ask the server, then the server will change the state; however I am struggling to implement this concept.
I am here to ask what should a true state system have? What models, functions, and what is something most people do wrong or something I should avoid. I just need help with ideas for developing the systems core, not making the entire system. Any tips or help would be much appreciated.
The only reason I say that this is for a battlegrounds game is because my other games don’t require such an in-depth system to function, often having 5 or less states.