Weird delay with ragdoll/knockback

hi, so im making a ragdoll knock back for my game which works fine but for some reason there is this strange delay on the attackers screen, the person who is getting knocked back sees there self being knocked back smothly but the person who is causing the knockback sees a little stutter on their screen

im aware of the latency or whatever u call it between a player and the server and all that but im trying to figure out why the knock back/ragdoll freezes in the middle of it instead of just being normally delayed

2 Likes

It’s most likely the connection between the server and the client, as the server takes time to process information it may cause delays but other than that it could be latency, internet issues, high ping or low server fps (which I doubt)

i get that but if u look at games like gpo or strongest battle grounds the knockback is clean and smooth(there is a small noticeable delay with theres too but its barely noticeable)

Sorry for bumping this but were you ever able to find a solution?

yes i did find the sollution, sorry for the late response

Do you mind me asking what you did?

i kinda forgot exactly what i did, give me a few minutes to look at my script

1 Like

so there is no way to “fix” this but u can reduce the ammount of delay because there will always be delay between the server and client and allat, what i did was run some test of what was casuing the delay and that happened to be when they enemy was entering the ragdoll state, if they enemy was already ragdolled then there wouldnt be delay, so there are multiple ways to go about “fixing” it but heres how i did it

so what i did was for 1 detect if the player was already ragdolled then just keep them ragdolled so the next attack in the combo would be alot smoother

2, if the player was not already ragdolled there would be a SLIGHT delay which i figured out i could fix the freezing mid air(when ragdolled and knocked back) by tweening the max force to 0 BEFORE deleting the body mover because when the body mover was deleted it would cause the player to freeze for a second but for some reason if u slowly remove the velocity or max force of it THEN delete it (for example make them get knocked back then have like a 1 second tween play of the max force going from lets say 70000 to 0 then liek 3-4 seconds later delete the body mover) it wouldnt freeze

so in short, u cant really stop the delay but u can reduce it

External Media
1 Like

oh and one more thing, another thing u can do is make 2 hitboxes for ur attack, one casting before the main one and if the false hitboxes detects someone it puts them in the ragdoll state and if the ACTUAL hitbox touches them they stay in the ragdoll state, this is what ive done for my old games but its sorta messy because even if they enemy doesnt get hit or they block or something their character will slightly twitch due to quickly being put into a ragdoll state

hey im having the same problem, did u discover any new method other than making 2 hitboxes or learn anything new?

making the knockback client sided

but for enemy player that knockback will be replicated to server before being replicate to the attacker? I’m not sure what you meant