I am currently working on an attacking system using ClientCast, but the raycasts/projectiles are inaccurate. Whenever a new projectile is “launched”, it pauses in place briefly before fully launching. It seems to only happen on the client side, as the raycast does damage even when the projectile appears to not touch the NPC.
Video below shows the projectile dealing damage despite NOT touching the NPC
robloxapp-20221124-1217061_Trim.wmv (322.5 KB)
When I used :SetNetworkOwner(player) on the projectile part, it stopped the lagging of the projectile but caused another issue with the raycast. The raycast and projectile would both pass through the NPC (on the client side), but not deal damage unless the player was closer to the NPC than they needed to be.
Video below shows the projectile NOT dealing damage despite touching the NPC
robloxapp-20221124-1221597_Trim.wmv (361.6 KB)
Here is my code:
The script inside the projectile part (that makes it do damage):
The script inside ServerScriptService (that launches the projectile):
The localscript inside StarterGui (that fires a remote event when the player attacks among other things):