Ragdoll - When touching the part all players fall (Video + rbxl)

I would like only the player who played the part to fall and not all players. Thanks

Video.wmv (1.7 MB)

Test.rbxl (37.6 KB)

The ragdoll server script doesn’t check if the touched humanoid is the same as the localplayer’s humanoid
on line 79 replace with this

CanTouch = true;
for index, RagdollBaseParts in ipairs(RagdollFolder) do
	if RagdollBaseParts:IsA("BasePart") then
		RagdollBaseParts.Touched:Connect(function(P)
					
			local _Humanoid = P.Parent:FindFirstChild("Humanoid", 1000);
			
			if _Humanoid == Humanoid and CanTouch then
				if RagdollBaseParts:FindFirstChild("StunDamage") then
					CanTouch = false;
					Character.Values.StunValue.Value -= RagdollBaseParts.StunDamage.Value;	

					task.wait(30);
					CanTouch = true;		
				end;
			end;
		end);
	end;
end;

edit: just noticed the 1000 as second argument to FindFirstChild doesn’t it normally take a boolean value?

2 Likes

Worked perfectly now i can continue with my game

Thanks!