Works normally, but I want the script to have a debounce. Whenever i try to add a debounce though, it just doesn't run.
script.Parent.Touched:Connect(function(throw)
local debounce = false
if debounce then
debounce = true
script.Parent.Anchored = false
script.Parent.Velocity = script.Parent.Velocity + Vector3.new(-100, 100, -100)
wait(0.25)
script.Parent.Parent.Parent.leaves.oddleaves.WeldConstraint.Enabled = false
local explosion = Instance.new("Explosion", workspace)
explosion.Position = script.Parent.Parent.Parent.leaves.oddleaves.Position
wait(0.45)
debounce = false
end
end)
Whenever I try to touch the part which should start this script, nothing happens. Wiki hasn't exactly been helping very much, either.

4 comments
ah, ok. i'll be sure to keep this in mind in the future
Feel free to mark as answered on my post if I answered your question.
I can't figure out how to mark it as answered. How can I do that?
There should be a button labeled "Accept Answer" with a checkmark bellow this comment box.