In this kill script that sucks that remaining parts of the player's character into the center of a part named "orb," the debounce acts as if it weren't there; it inserts the BodyPosition into each body part numerous times. Does anyone know how to make a working debounce for this function?
orb = script.Parent
Debounce = false
orb.Touched:connect(function(toucher) if Debounce == false then Debounce = true else return end --[[debounce wrap]]
human = toucher.Parent:FindFirstChild("Humanoid")
if human ~= nil then character = toucher.Parent else return end
character:BreakJoints()
for i, v in pairs(character:GetChildren()) do
if v.ClassName == "Part" then
v.CanCollide = false
suction = Instance.new("BodyPosition")
suction.Parent = v
suction.D = 100
suction.maxForce = Vector3.new(400000, 400000, 400000)
suction.P = 1000
suction.position = orb.Position
end
end
Debounce = false --[[end of debounce wrap]] end)

1 comment
That is already in his code.