#💬 clueless_tinyʹs Feedback
1 messages · Page 1 of 1 (latest)
looks nicee
would you mind sharing the knockback mechanic ? i cant replicate it that smooth
uh
yeah actually
im also relatively new to this too
and took a lot of nagging on other developers to get a good way
Heres what you basically need to do
this is all in a module btw
lol i just wrote entire essay on ragdoll method
im so stupid
uh what you wanna do
is check if the player that the knockback is being applied to, is a player. If they are then fire to them to do velocity on client side. If its an npc and a player is applying it, then set network ownership of the humanoidroot part of the NPC to the player, then fire to the player (attacker) to apply it to the NPC. And as a failsafe, after firing to the player to do it, still do it on the server. It basically means if something happens or the player is too laggy, it will just run normally on the server but not so smooth
but if everything is fine and the player does apply it, it takes priority kinda, so no need to worry about cancelling or anything
heres an old but buggy video of it
basically the green outline means the player is controlling it
its a but buggy in the video, but you can see what a bit of experimenting does like in the video this post is originally attached to
so you do it twice, or just on the server if player is too laggy ?
same type of thing as you did, some abilities
but i was never able to make it look smooth and delay free like you did, thats why I asked for your logic lol
i assume its bc of network ownership, but what do you use to apply vel to the HRP ?
twice, runs on server and client same time, but because its usually faster on the client, theres no delay
instead of running just once on the server, which does have delay
module i made that takes in these parameters (ignore lastHit)
and it adds LINEAR velocity
you get the idea
minus some other larger snippets for replication above all of this
ohhh yeah, and it doesnt duplicate
yeah i suppose
thanks a lot
you're explaing xell
well
i'm gonna try to replicate that
yeah because you are setting the velocity of a part, not adding velocity onto it. So even if it runs on client, and server sets it, it sets it to the same thing
do server side first
then when its bug free and finished
move on to client rep
OH yeah sorry that was a stupid question
alright
i'll take your advice thanks a lot