Group door to a Group Rank Lock Door

Hi Developers!

I just need your assistance in adding a group rank minimum and maximum to my current group lock script. How would I do it?! A copy of the script is below!


Player:GetRankInGroup() will return the number that their current rank is within the group.

Okay, would that go on line 2?

Put it after you check if they are in the group. The parameter in the parenthesis should be the group ID. Use greater than and less than to check if they are highly ranked enough.

Alternatively, you could also replace the check if they are in the group with just this function because if they are not a group member it will always return the number zero.


if game.Players[hit.Parent.Name]:IsInGroup(0000000) [Player:GetRankInGroup() then

Like that…? I’m a little confused by what you’re saying right now.

Replace that line with this:

if game.Players[hit.Parent.Name]:GetRankInGroup(0000000) > 0 then

It checks if they are a member (non member’s ranks are always 0). You can change 0 to a higher number to restrict access to anything above that number.

1 Like

Thank you!!! (And for your patience)

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.