How would I go about making a opening door that opens by a command, and where only a certain rank would be able to use that command

I’m not sure where to go about this, I want the door to open if the player says the “:open” command in chat. But also only select ranks could use the command to open the door.

You can get messages sent by clients with the “Chatted” event from the player instance. Suppose our input is just the string we got. What I mean by this is let’s say I chat “hi” the string can be represented as my player instance and a string equivalent to “hi”. With this in mind what we can do from here in a short hand would just be to say, if message == “:open” then do your function to open the door. Now many people will stop here, not really a purpose to if you think of it but however if you want you can just see if the string has that phrase. string.match() is great for that.

Adding on to above, to get the rank of a player in a group, you can use the method GetRankInGroup on the player instance, for example:

if player:GetRankInGroup(TheGroupID) > rank then print('Opening door...') end

The rank can be found by going to the roles tab under the configure group page. In this screenshot for example, the rank for “Board of Directors” is 13:
image