Hey guys, my linear velocity system is not working as it should. I am trying to create a knockback / retreat jump thing for my enemy NPC. This is whats happening:
for i,v in ipairs(enemy:GetDescendants()) do
if v:IsA("BasePart") and v:CanSetNetworkOwnership() == true then
v:SetNetworkOwner(nil)
end
if v:IsA("BasePart") then
v.Massless = true
end
end
I’m not sure if that’ll work. As I understand it, you only need to set the network owner on the primary part, HumanoidRootPart.
Try setting the NetworkOwner, as @WhiteOut_RBLX has suggested. Although, there is no SetNetworkOwner function for a Model class, so you’ll have to set a primary part (if you don’t have one already) and call SetNetworkOwner with nil.
Should be noted, in the case you have a local script doing the knockback, that you’ll have to make it server-sided, in order for it to work with the suggested solution.
Right. It may still lag, perhaps you could try to optimise your script a little, to reduce the delay? Not sure really. Another note, you’ll only need to set the network owner to nil once, no need to do it every time.