This script is disabled on purpose, but when the other script is activated, it creates a "part" scaled 60,60,60 radius and it is a kill zone purpose. when it enters the zone it does 2k damages, but checking the output, I see 20+ "damage" prints and what gives a whooping 40k damage and that's too much. How do I fix this script? Thanks.
And when it does go over 2k damage, the health bar glitches and there's this long red line above my screen through the roblox default health bar.
--Kill OnTouch
function onTouch(part)
local humanoid = part.Parent:FindFirstChild("Humanoid")
if (humanoid ~= nil) then -- if a humanoid exists, then
print("damage")
humanoid:TakeDamage(2000)
end
end
script.Parent.Touched:connect(onTouch)

3 comments
But then how do I want it to kill multiple people? When I placed humanoids in the kill zone, only one dies
Then you should add a debounce for each individual player. This can be accomplished in mutliple ways but I like to add an instance to the Player that touched it.
Did some research and all I seen was people discussing about dictionary's and creating tables something to do with remote event. I don