I'm not sure if this is what you meant but..
02 | local GroupId = 9218769 |
04 | game.Players.PlayerAdded:Connect( function (localPlr) |
05 | repeat wait() until localPlr.Character |
06 | local PlayersRank = localPlr:GetRoleInGroup(GroupId) |
07 | if PlayersRank = = "Owner" and "Co-owner" then |
08 | localPlr.Character.HumanoidRootPart.CFrame = game.Workspace.TeleportSpawn.CFrame |
09 | print (localPlr, "teleported to secret room" ) |
Change the GroupId to the GroupId you got so it works.
How it works is when the player joins it repeats till their character spawns.
Then it gets their Role from the GroupId.
If the Players Role/Rank is Owner or Co-owner then it'll teleport them to this part's CFrame.
then it'll print in the server script that the player teleported to a secret room.
(You can add more PlayerRanks by doing "if PlayersRank == "Blah" and "Blah" and "Blah" then" just add another and and yeaa)
If this is what you meant then here you go.