How do i make the blackhole part hit all the players it touches but not loop the damage so it wont instantly kill the player
touch = true blackhole.Touched:connect(function(hit) local ehum = hit.Parent:findFirstChild("Humanoid") if ehum and ehum ~= hum then local target = hit.Parent if touch == true then -- If i take this off, it would hit all the players touch = false -- but also loop the damage and instantly kill them ehum:TakeDamage(35) ehum.Sit = true wait(0.1) target.Torso.Anchored = true wait(3) target.Torso.Anchored = false end
Please help me if you can
I didn't really check your script, but I'll answer your question. There is a 'trick' that is really useful when you are dealing with this kind of event, that fires multiple times.
It's called Debounce, and it simply uses a variable to create a condition when the event is triggered. When the event fires, that variable will be set to false and it will keep it from firing for a while - usually set by time.
You CAn make a cooldown OF damage using bolean values like:
Bol = true
IF bol = true then Bol = false Print("hay") Wait(3) Bol = true End
Remember that Bol = true needs to be outside of the touched function.