I'm trying to make a door that will allow multiple ranks to go in it. Line 9, isn't working. It worked with three of my ranks but it won't work with the rest of my ranks. (All six of them). Note: Picture line 9 as a straight line. (I already fixed the missing or, but it still won't work). Here's the link to the script: https://pastebin.com/FwCwdGTQ
COMMUNITY QUESTION
Can someone take a look at the script and tell me if it's correct or not?
1 answer
There is an easier way of doing this you can just use > symbol instead of checking every rank through the script using GetRankInGroup
local groupId = 4875330
local door = script.Parent
local debounce = false
local Rank = 250
door.Touched:connect(function(part)
local plr = game.Players:GetPlayerFromCharacter(part.Parent)
if plr then
if plr:IsInGroup(4875330) then
if (plr:GetRankInGroup(groupId) >= Rank) and not debounce then
debounce = true
door.Transparency = 0.5
door.CanCollide = false
wait(1)
door.Transparency = 0
door.CanCollide = true
debounce = false
end
end
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

5 comments
its blocked
Oops, here's the actual one. https://pastebin.com/FwCwdGTQ
You're missing an or between plr:GetRoleInGroup(4875330) == '14 | Advisor' and plr:GetRoleInGroup(4875330) == '13 | Executive'
I know, I already fixed that. But it still isn't working,
Btw, remember to accept my answer, thanks