So, I have some parts that damage you upon touching them. I put them all in a folder and made the damaging scripts into one. There's a problem, though. I applied debounce and it worked, but you couldn't be damaged by any of those parts for that amount of time. (I removed it in the script below.)
local b = script.Parent:GetChildren()
for i, c in pairs(b) do
if c:IsA("BasePart") then
c.Touched:Connect(function(obj)
if game.Players:GetPlayerFromCharacter(obj.Parent) then
local plr = obj.Parent
plr.Humanoid:TakeDamage(50)
end
end)
end
end
How would I make the debounce apply to only a single part?

1 comment
No need for debounce, just put the certain part you want with a different name of all the others, and then point the script toward that part.