How to make a door with click detector which works for only selected ranks in a group?

So, I don’t know how to make a door which is accessible for certain ranks only. I am a very bad scripted.

2 Likes

You can use GetRoleInGroup
GetRoleInGroup()
Or GetRankInGroup
GetRankInGroup()
You can make a local script that makes the door can collide false only for players that their rank in the group is higher than 200, or if their role is Owner.
Or a server script, with a click detector, check if the player that clicked has a rank, and if the player has the rank, open the door. That way, only players that have your rank will be able to open the door/ access it.

3 Likes

What you would do is when a player touches the door, check what role they are in your group using GetRoleInGroup() or GetRankInGroup like @LightningLion58 mentioned. If they are in that certain role or a higher role, then tween the door, or just use :Destroy()

3 Likes