So I want to make a door that people in the groupID: 2551575 who are rank 239 or higher can walk through a door but people below rank 239 cannot walk through the door.
Best way to make a door like this?
1 answer
Here are some resources that will be useful.
http://wiki.roblox.com/index.php?title=API:Class/BasePart/Touched
http://wiki.roblox.com/index.php?title=API:Class/Player/GetRankInGroup
http://wiki.roblox.com/index.php?title=API:Class/BasePart/CanCollide
When the part is touched, use the hit value returned from the function.
hit.Parent will the character. Use GetPlayerFromCharacter(hit.Parent) to get the player. You can then call the function GetRankInGroup to check if they are the required rank in the group and set the CanCollide to false if they are. If they are not in the group then kill the player as you don't want them walking in after someone with the rank.
Set the CanCollide to true after
This discussion is preserved as it was. New answers, comments, and votes are closed.
