Weird Collisions on Ragdoll

I am making a PVE game. You shoot and kill enemies. I’ve recently reverted the game version and now when you kill an enemy, everything goes straight to the floor except for their head. I’ve tried things like enabling/disabling the collisions of their base limbs to their attached accessories/meshes. I don’t know what’s causing the issue as it worked fine before.

1 Like

When they die you should set all their parts NetworkOwnership to the server. I’ ve had this issue before and I fixed by doing what I said, I hope it works for you and let me know if it does!

1 Like

@Empereans not sure this has anything to do with network ownership.

Have you checked to make sure that the enemies are actually dead when they are ragdolled?

Yeah I did and I fixed them by giving Network Ownership to the server

1 Like

would i do that with a script?

1 Like

Yes, you do it using a script which RunContext is Server.

1 Like

i’m no scripter by any means, this is what I’ve come up with using other scripts and it doesn’t appear to be working, can you tell me what’s wrong with this?

script.Parent.Humanoid.Died:Connect(function()
	local function setNetworkOwnerOfModel(model, networkOwner)
		for _, descendant in pairs(model:GetDescendants()) do
			if descendant:IsA("BasePart") then
				local success, errorReason = descendant:CanSetNetworkOwnership()
				if success then
					descendant:SetNetworkOwner(networkOwner)
				else
					error(errorReason)
				end
			end
		end
	end
end)

First of all you didn’ t wait for humanoid, second you made it a function that doesn’ t even get called.
This is supposed to be in StarterCharacterScripts.

local Character = script.Parent
local Player = game:FindFirstChildOfClass("Players"):GetPlayerFromCharacter(Character)

Character:WaitForChild("Humanoid").Died:Connect(function()
local Descendants = Character:GetDescendants()

for _ = 1, # Descendants do
local BasePart = Descendants[_]

if BasePart:IsA("BasePart") and BasePart:CanSetNetworkOwnership() then
BasePart:SetNetworkOwner(Player)
end
end
end)
1 Like

strangely it didn’t work after numerous testing and novice tinkering attempts. I can send screenshots of the AI’s descendants or other stuff that might interfere with the script if you think you can figure out the issue. Was there any specific parts of the script that I was supposed to edit? I tried a couple things but if im being real I don’t really know scripting all that well

Were there any errors?
Characters