Ragdoll floating when called from server side

Hello, I am making a battlegrounds game and right now the ragdolls seem to float when the server ragdolls them. I don’t know how to fix this issue, and I’ve searched through a lot of places. The player’s death ragdolls work, but the ragdolls on npcs are not working.

I’ve tried setting the network ownership to server, setting platformstand to true, and everything else and it’s still not working :frowning: As seen in the end of the video, the ragdolls falls down after 4 seconds for no reason?

Here is the function for ragdolling the npcs.

Module.Bot = function(bot)
	task.spawn(function()
		local H = bot.Humanoid
		bot.HumanoidRootPart:SetNetworkOwner(nil)
		if bot:FindFirstChild'HumanoidRootPart'and H.Health~=0 and bot:FindFirstChild'LowerTorso' then
			H:SetStateEnabled(Enum.HumanoidStateType.GettingUp,false)
			H:ChangeState(Enum.HumanoidStateType.Ragdoll)
			H.PlatformStand = true
			for _,v in pairs(H:GetPlayingAnimationTracks())do v:Stop(0)end
	

			for _,v in pairs(bot:GetDescendants()) do
				if v:IsA'Motor6D'and Module.Check(v.Name) then
					v.Enabled = false
				elseif v:IsA'BallSocketConstraint' then
					v.Enabled = true
				end
			end
			wait(5)
			print("Up")
			H.PlatformStand = false
			H:SetStateEnabled(Enum.HumanoidStateType.GettingUp,true)
			H:ChangeState(Enum.HumanoidStateType.GettingUp)

			for _,v in pairs(bot:GetDescendants()) do
				if v:IsA'Motor6D' then
					v.Enabled = true
				elseif v:IsA'BallSocketConstraint' then
					v.Enabled = false
				end
			end
		end
	end)
end

Here is where I actually call this function.

if combo == 4 then
	if game:GetService("CollectionService"):HasTag(hit.Parent, "Bot") then
		-- Bots
		M.Joints(char)
		M.Bot(char)
	else
		-- Players
		M.Ragdoll(char,true)
	end
end

If you know why my ragdolls are floating, then please help.

1 Like

r6 rigs dont have a lower torso

That’s what I’ve named my torso in my R6 character.

i dont think you need to set the humanoid’s state to ragdoll.
also, a tip, set autorotate to false when ragdolled

Both didn’t work, they seem to fall down after 4 seconds but I do not know why…

thats pretty weird
i have no idea man im not great at coding yet but best i can do is show you my code

The model I’m using for it is here, someone had a solution and I’m using their code but it’s still not working.

You need to set the HmanoidStateType to “Physics.” for some reason it’s only possible on the client, so you have to use remoteevents or something.

1 Like

An NPC isn’t a client though, thats the problem.

I know but you set the networkowner to the clent.

try this for npc

NPC.HumanoidRootPart:SetNetworkOwner(PlayerThatsAttacking)

I’ve tried it too, doesn’t seem to work.

ok