Does anyone know how you can make a block that slowly kills you after being touched?
Put this under the part that will kill
local killPart = script.Parent local damage = 10 -- change this to how much damage to do local debounce = true killPart.Touched:Connect(function(part) if part.Parent:FindFirstChild("Humanoid") then debounce = false local hum = part.Parent:FindFirstChild("Humanoid") hum:TakeDamage(damage) repeat wait() killPart.TouchEnded:Connect(function() debounce = true end) until debounce end end)
You could make use of the Touched event and then slowly damage the player after he hits it.
Eg :
local globalDeb = false part.Touched:Connect(function(hit) if hit.Parent:FindFirstChild('Humanoid') and not globalDeb then globalDeb = true repeat wait(0.8) hit.Parent.Humanoid:TakeDamage(10) until hit.Parent.Humanoid.Health <= 0 end end)