Humanoid tripping upon getting up from ragdoll even with "TripFix" code solution

The code i’ve used to prevent humanoid from “tripping”:

Humanoid:SetStateEnabled(StateType.FallingDown, false)
Humanoid:SetStateEnabled(StateType.Ragdoll, false)
Humanoid:SetStateEnabled(StateType.Climbing, false)

The ragdoll module i used:

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)

1 Like

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.

3 Likes

Nowoshire is right, you have to use

			char.HumanoidRootPart:SetNetworkOwner(nil)

to fix this issue, good luck! You also could put it after

Character.Humanoid.RequiresNeck = true

better way:

if Character:FindFirstChild("HumanoidRootPart") then
	Character.HumanoidRootPart:SetNetworkOwner(nil)
end

im not that smart, but i hope it will help you, fix me if i am wrong somewhere

1 Like

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.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.