So, when ever there is a rank door, and someone that is allowed opens it, then that allows others able to come in since the door is opened.
local rank = 4
local groupID = 6609636
script.Parent.Touched:connect(function(hit)
if (hit and hit.Parent and game.Players:FindFirstChild(hit.Parent.Name)) then
if (game.Players[hit.Parent.Name]:IsInGroup(groupID) and game.Players[hit.Parent.Name]:GetRankInGroup(groupID) >= rank) then
script.Parent.CanCollide = false
script.Parent.Transparency = .9
wait(1)
script.Parent.CanCollide = true
script.Parent.Transparency = 0
else
script.Parent.CanCollide = true
end
end
end)
I also put the Local Script in the door seeing if that would work, but it didn't.
