This is my code so far:
local flood = script.Parent
local debounce = false
local cooldown = 1
local damage = 10
flood.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if debounce == false then
debounce = true
if humanoid then
humanoid.Health -= damage
end
task.wait(cooldown)
debounce = false
end
end)
I already got the tween service and everything so that the flood moves up. However, the issue here is the touched event not working because the flood part has can collide set to false. So, how should I tackle this? Should I use workspace:GetPartsInBox()? How do I make it so that the player inside the flood region takes 10 damage per second?
** You are now Level 1! **