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)
✓ ANSWER ACCEPTED
Why doesn't it let me walk through?
2 answers
✓ Accepted answer
...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.
1 comment
0
Im just saying, it worked for me for a team-only door, no reason to click down the rating.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
THx