Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Humanoid not taking damage?

handle.Touched:connect(function(hit)
	if equipped and humanoid and humanoid.Health > 0 and hit and hit.Parent.Enemy.Value == true and not hit:isDescendantOf(character)then
		local targethumanoid = hit.Parent:FindFirstChild('Humanoid')
		if targethumanoid and targethumanoid.Health > 0  and not hithumanoid[targethumanoid]then
			print(hit.Name..' has been hit')	
			targethumanoid:TakeDamage(damage*combo)
			hithumanoid[targethumanoid] = true
		end
	end
end)

This is a small chunk of the code. The humanoid I'm trying to hit is a snake, and everything is working as it should, except it taking damage. I put a print in there, and it's printing, it's just not taking damage. I can upload more of the script here if you need more details. Is there any way I can fix this?

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.