How do I make it so the game kicks people that aren't a group rank or dont have a gamepass?
I am making a gamepass that will allow people to see my beta game, if they don't have it they will be kicked. But, I want to make it so a certain group rank can still play without the gamepass, such as the developers. Can someone help? I'm bad at this stuff, lol.
this is what I tried, but it does not work.
01 | local MPS = game:GetService( "MarketplaceService" ) |
03 | local Player = game:GetService( "Players" ).LocalPlayer |
05 | game.Players.PlayerAdded:Connect( function (plr) |
06 | if MPS:UserOwnsGamePassAsync(plr.UserId,ID) then |
07 | elseif Player:GetRankInGroup( 5791590 ) < = 255 then |
10 | plr:Kick( "You do not own the required gamepass." ) |