Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How would I make a button usable by only a certain rank in a group?

Asked by 4 years ago
Edited 4 years ago

I’m currently developing a Hospital and I’ve put emergency alarms/buzzers in every room, however, I don’t want any random person to be able to activate one, especially trollers etc. Therefore, I wanted to make it so only a certain group rank would be able to push the button. How would I do this?

Any help would be greatly appreciated!

0
Can you include your code attempt even if it does not run as SH is not a request site for code. https://scriptinghelpers.org/help/how-post-good-questions-answers User#5423 17 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago

On a Player object, you can use a function called :GetRankInGroup(groupid), which will return the value of their rank in the group.

https://developer.roblox.com/en-us/api-reference/function/Player/GetRankInGroup

If you need more details, let me know.

Ad

Answer this question