#knockback delay

1 messages · Page 1 of 1 (latest)

placid hound
#

hello, im having a problem in a small game im making, when i hit someone with a baseballbat the hit is detected instantly (i use shapecasthitbox) and the knockback script logic is also ran instantly but theres a delay until the character i hit actually gets the knockback, i guess because of a delay from the roblox physics engine or something idk, can someone help me find a solution / tell me a way to avoid this pls? i was thinking about first visualising the knockback on the client and later on synchronise it with server but whats the best way?

onyx questBOT
#

studio** You are now Level 1! **studio

trim plinth
#

wait for server authority

placid hound
#

wdym

trim plinth
#

you need prediction to solve this and roblox doesn't have it, lucky they're adding it or i'd make my own

placid hound
#

so i need to predict the knockback on the client and give the player instant feedback that they hit someone by "faking" the knockback locally? and then the server does its thing?

trim plinth
#

yes

placid hound
#

alr, but how? i tried adding knockback on the client but somehow it didnt really work, is there a "best" way?

trim plinth
#

lol

trim plinth
placid hound
#

wdym by that? sorry haha

trim plinth
#

roblox is adding prediction, that's what they call that system

#

not released yet but soon

#

so just ignore the problem for now

placid hound
#

oooh alr, so for now im just gonna keep it as it is, and wait until they release it

#

alr alr thanks alot!

echo rivet
#

If it’s just npcs and you’re using a physics based knock back then you can set the npc network ownership to the client and control the knock back on the client. The only problem is the system is more vulnerable to exploiters which would require security features.

placid hound
onyx questBOT
#

studio** You are now Level 2! **studio