should i send the inputs to the server, then figure out what the player wants to do in the server, or should i have a controller on the client, turning the inputs into intents and sending them to the server, letting it execute the intents if they’re valid
becauase i want to use directional movement/holding certain inputs in order to trigger variants of abilities, and i would like the abilities to be modular, so i don’t know if having a ton of different controllers for each ability is very sustainable.
how should i handle it?
What I would recommend doing is figuring out the inputs in the client and then using validation checks in the server to determine whether the player can perform said action.
This way you keep client-sided logic in the client while still having an exploiter proof system. You could perform the logic in the server in most cases, but this way you keep the logic more organized and avoid having to pass arguments like the Player to every function called.
When it comes to “having a ton of different controllers” for the logic of one ability, having the logic performed on the server wouldn’t solve this (and having a lot of controllers isn’t necessarily a problem anyways), since you would end up having to perform the exact same logic on the server anyways.
Inputs are always handled on the client, for example you can’t check if the players presses e on the server. For handling user inputs use ContextActionService/UserInputService or use Roblox’s new input action system Input Action System | Documentation - Roblox Creator Hub
Considering the fact that the server would be handling multiple actions by multiple players at once it may be better to convert the inputs into “intents” on the client and send them to the server to save the server some work
I don’t know how maintainable or scalable this is though or if the performance difference between the two systems is really that big so it might just be a matter of preference
It is always better to handle inputs on the client rather than the server especially when you have lots of players to prevent the server from overworking too much and instead split the work across clients.