Hello! This is my first post so please excuse me if i’m doing anything wrong and please let me know,
Anyways, I am currently trying to make a combat tool but instead of making it where .Touched is handled on the server I am having .Touched handled on the client simply because it is way more responsive.
The only data it sends is 1. The enemy position, 2. The name of the character model, and 3. the current arm it is punching with. Once the server receives the data it does a sanity check by doing the .magnitude and subtracting the two values. If the subtracted value is lower than the leniency then it will pass and apply damage. If it is higher due to the client teleporting all players close to themselves or if they have really high ping it doesn’t do anything.
This works perfectly fine with normal punching but, once it comes to a special barrage move I made I started to worry. Since it uses the same .Touched as the normal punching it would fire every time it punched a player. This is a problem because the barrage animation is very fast to begin with and can also be scaled with the agility stat.
What I am trying to accomplish is keeping the script from consuming the bandwidth of the client and keeping it efficient. I don’t want it to lag the server either. Please suggest some ways I could fix this! The only way I could is to sacrifice the smoothness and responsiveness but I don’t want to do that.