In case this helps:
Tripping only happens after 10-15 knockbacks using temporary LinearVelocity;
LinearVelocity code:
--pardon how beatiful my code is
local LV = Instance.new('LinearVelocity', Character.HumanoidRootPart)
LV.MaxForce=math.huge
local att0 = Instance.new("Attachment",Character.HumanoidRootPart)
att0.WorldCFrame = Character.HumanoidRootPart.CFrame
local att1 = Instance.new("Attachment",Character.HumanoidRootPart)
att1.WorldCFrame = Character.HumanoidRootPart.CFrame
LV.Attachment0=att0
LV.Attachment1=att1
LV.VectorVelocity=OriginalAttackSource.HumanoidRootPart.CFrame.LookVector * KnockbackVelocity
game.Debris:AddItem(LV,.3)
game.Debris:AddItem(att0,.3)
game.Debris:AddItem(att1,.3)
EDIT: I tried toggling “Ragdoll” attribute on the NPC model multiple times without LinearVelocity and the NPC isnt tripping upon getting up (maybe LinearVelocity is the issue?.. Im afraid knockback effect doesnt get along well with ragdoll module)
If you haven’t already, try setting the network owner of the NPC to the server, or wherever you’re disabling the states, as SetStateEnabled does not replicate.
sorry for replying so late, that worked thanks!
also does changing network owner to client’s PC affects player’s gameplay performance?
and if it does, does it also mean setting network owner to nil (server) may also affect everyone’s ping?
(theoretically speaking, if there was ALOT of parts that has their network owner set to server)
The network owner of a part/assembly handles its physics, if the simulation is too complex, it can start to degrade the performance of the network owner.
Replication-wise, every part uses up some bandwidth. If there’s too many parts, bandwidth gets saturated, which results in data being throttled and ping going up.