Humanoid destroys itself when hit by a fast moving object

My games involves many fast moving projectiles. However, when a player is hit by such object, the humanoid has a chance of destroying itself

The humanoid did not die, it was destroyed, there is a difference

When a humanoid dies, it breaks joints when the health hits zero. Although, the humanoid is destroyed instead, leaving a permanent inanimate model essentially soft locking the player without developer intervention. I temporarily patched this by reloading the character when the humanoid is destroyed, but it is still an issue that heavily impacts game quality.

Here are some things to know:

  1. The larger the object, the larger chance that the humanoid is destroyed
  2. I have the collisions groups set up so the projectiles won’t collide with the player’s custom collision group with this script:
plr.CharacterAdded:Connect(function(char)
		plr.CharacterAppearanceLoaded:Wait()
		for i, v in pairs (char:GetDescendants()) do
			if v:IsA("BasePart") then
				v.CollisionGroup = "Players"
			end
		end
	end)

Note that the issue is still happening even with disabling collision.

  1. I may be wrong, but it appears to be that if the player is hit in the uppertorso/humanoidrootpart, they have the greatest chance of destroying the humanoid.

Another thing I want to add is this problem was reported in studio and in game, and a full script is not available since that is the only segment of code relevant to the topic (there are no lines of code that destroy the humanoid I checked, only take damage)

1 Like

Can you provide some sort of video of that happening so we can see exactly what you mean?

1 Like

Also, is there any other scripts running, something might be destroying the humanoid in another script.

1 Like

So you’re saying a part with high velocity and no collisions going through the player character will delete the player’s humanoid? This makes no sense and is 100% a script, unless I misinterpreted the problem you’re facing

1 Like

Apologies for the reply, I wanted to wait for the time when I could best answer your questions

@supergeorge2007
I would absolutely record a video for you. However, when a humanoid is destroyed, it sort of well, removes all clothing instances. And I don’t want to risk my account being terminated by potentially breaking the roblox tos

@SelDraken @Orbular3
Yes there was, I was using a modified version of the classic superball, and I found that the dated script had a bad line that destroyed the humanoid instead of the tag. It is now fixed, here is the line of code for future reference:

function tagHumanoid(humanoid)
	-- todo: make tag expire
	local tag = Ball:FindFirstChild("creator")
	if tag then
		-- kill all other tags
		while(humanoid:FindFirstChild("creator")) do
			humanoid:FindFirstChild("creator").Parent:Destroy() --bad line of code
		end

		local new_tag = tag:Clone()
		new_tag.Parent = humanoid
		debris:AddItem(new_tag, 1)
	end
end

To summarize, I trusted the classic superball script a little too much, and when you guys told me to check other scripts, I found the faulty line.

This is a concern in my opinion, that such a famous projectile created by Roblox has poorly formed scripts. It could harm many upcoming experiences in the future. However, it could also be that it worked properly back in the day and it just doesn’t work as well anymore.

2 Likes

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