Hello. So I’m working on an advanced movement system. I want to encapsulate the code because each feature (sprint, air jumps, crouching, sliding, etc) is heavy on code. My problem is:
How do I share state between these modules so they don’t interfere with each other?
As a side note: I prefer not to use OOP.
Side note 2: Since movement is a pre-defined thing in Roblox, it can be hacky to get the conditions needed to enter certain states, which is why I didn’t settle on a basic state machine.
I feel like a shared module that is only read and written to would be fine but it feels rather hacky for some reason. Am I wrong? Is this a standard way of doing things? Thanks