I tried doing “knockback” effect on players using Client-Sided velocity which DOESN’T cause flings:
--Client Side
knockbackEvent.OnClientEvent(direction, speed)
repeat
victimRootPart.Velocity = direction * speed
wait()
until VelocityActive== false
end)
but when i try doing the same on NPCs using same event, it doesnt knock them back, so i decided using server-sided LinearVelocity/BodyVelocity (it worked). However both of these Velocity types cause NPC to get flinged if there’s wall/ramp behind it.
What exactly i need to do/use to make NPCs get knocked back and at the same time avoid making them getting flinged?
(in a nutshell: Client-Sided Part.Velocity somehow doesnt work on NPCs)
Maybe its caused by the tripping plus being pushed into a surface, NPC’s are notorious for falling over all the time and the fling could maybe be caused by hip height issues or colliding parts being to rough with one another, have you tried firing a ray in that knockback direction to detect a wall and apply a shorter amount of velocity, or you could stop an npc from tripping over by setting its HRP network owner to the player and running this to prevent tripping on the client.