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?
#knockback delay
1 messages · Page 1 of 1 (latest)
** You are now Level 1! **
wait for server authority
wdym
you need prediction to solve this and roblox doesn't have it, lucky they're adding it or i'd make my own
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?
yes
alr, but how? i tried adding knockback on the client but somehow it didnt really work, is there a "best" way?
lol
just wait for server authority
wdym by that? sorry haha
roblox is adding prediction, that's what they call that system
not released yet but soon
so just ignore the problem for now
oooh alr, so for now im just gonna keep it as it is, and wait until they release it
alr alr thanks alot!
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.
yea i read that aswell just a few minutes ago but i wasnt sure, thanks, im gonna try that
** You are now Level 2! **