While making my game, it’s gotten to that time where I need to start implementing remotes for various different purposes.
One such purpose is the player’s inventory. I use DataStore2, and I have the inventory store set to run a function that fires a remote to the player whenever that player’s inventory is changed. So on the client, the code is pretty easy:
remote.OnClientEvent:Connect(function(stuff) --do stuff with stuff end)
But the problem arises when I have a lot of different remotes with very different purposes. Best practice is to always do visual stuff on the client instead of the server, so I’ll need to handle remotes for everything visual, as well as remotes for anything gameplay related like timer starts, inventory updates, etc.
Do you get what I mean? When you have many remotes with many purposes, what is the best way to handle all of those purposes? Should I have one script to handle nearly every remote, or one script for each remote? If the first option, the code would get pretty messy connecting to so many remotes.