function onTouch(Player) if GetRankInGroup(947529) >= 9 then script.Parent.CanCollide = false wait (1) script.Parent.CanCollide = true end end script.Parent.Touched:connect(onTouch)
...Fixed.
function onTouch(hit) local plr = game.Players:GetPlayerFromCharacter(hit.Parent) if plr == nil or plr:GetRankInGroup(947529) < 9 then return end script.Parent.CanCollide = false wait(2) script.Parent.CanCollide = true end script.Parent.Touched:connect(onTouch)
If the above doesn't work, use the same answer as what Code used and add: 1) outside of the function put ~~~~~~~~~~~~~~~~~ debounce = false
Right under ~~~~~~~~~~~~~~~~~ if plr == nil or plr:GetRankInGroup(947529) < 9 then return end
add:
debounce = true
also under
script.Parent.CanCollide = true
add:
debounce = false
This is all only if the answer above doesn't work, the answer corrects a mistake but I don't have time to test it so I am just giving you a solution if the answer doesn't work.