Adding onto this, it’s not hard to fork it and implement your own safe hit-verification system. My game follows this model:
the client sends a message to the server telling it to attack
the server validates whether the client is able to attack, plays the animation and the hitbox
the client calculates the hitbox, and when the client detects it hitting something it sends that to the server. The client sends three pieces of info to the server:
position of where the collision / hit occurred
How long into the animation the client was in when they hit
The client’s ping
the server receives this data and:
Backtracks to see where the player’s position was during X seconds ago, where X is the player’s ping
calculates where the sword’s position would be from the animation-time and calculates how plausible that hit was (simple magnitude check between hit-position and sword-position)
and finally determines whether the hit was real enough or not
This model provides one of, if not the most accurate hit-verification systems, that I could come up with.
How interested would you be for having this module expand the available hitbox types, to more than just raycasting (i.e., for example using @EgoMoose’s rotated region3 module for a cuboid-shaped hitbox)?
Please read the thread fully before replying. This module is created for easy switching between client and server contexts - clientcast pretty much communicates between the clients for you. It is stated (& elaborated more thoroughly) in the ‘Introduction’ paragraph at the top.
No, ClientCast is designed by me from the ground-up because Swordphin123’s is mostly designed with server in mind. Another issue with Swordphin123’s is that it’s pre-designed; by that I mean that it’s less customizable, for instance you can’t hit multiple players with only one hitbox with their module, which you can with ClientCast.
u can hit multiple players tho i used his system to create a sword system with part wise health parrying stamina and a lot of maths behind it and like it doesnt give too many issues also how exactly r u sanity checking?
There’s many more limitations to that module, such as this:
OnHit events no longer needs to be disconnected as the issue of multiple damages is fixed. Please do not try to disconnect OnHit as the event is now managed entirely by the module and doing so can break certain functions.
You can’t disconnect your own events either - clarifying my point further.
there is a part mode in it and for the disconnecting just do hitstop and hitstart since it disconnects when u do hitstop and u cn just do hitstart again its not a problem
Problem or not, that’s debatable - I’d rather just code in my own debounce than having to call two functions each time.
The philosophy of ClientCast is to be as barebones as possible whilst offering powerful features to give room for as much of customization as possible.
I don’t really. That is up to the end-user to implement, as there’s no perfect solution for every game (see the Important notice under How to Use).
For my game, I sanity check by backtracking the animation on server, get the attachment the client raycast from, and calculate how far off the line the sent position was.
The “line” is the direction between the backtracked attachment’s positions.
Also: if you don’t feel comfortable making your hitboxes more lenient in exchange for ping compensation, you can always just set no owner for the ClientCaster and instead just calculate it on server.
tht kinda just beats the point of me shifting 20 different scripts to use this and also i feel this is just a version of raycasthitbox which is harder to use and has lesser features… but its alr i cn tell u put a lot of work in it
It’s up to you to determine how useful you deem it. I’ve actually been using Swordphin’s hitbox before, but my playerbase complained about hitboxes missing and being inaccurate, so I ended up making ClientCast to fit for these new fits. While it’s hard to re-create complex systems like in CS:GO where they accurately backtrack from where the client shot due to Roblox’s packets being unordered, it is nevertheless industry practice to calculate hitboxes on client, and validate them on server - and that’s for a reason.