game:GetService("Players").PlayerAdded:Connect(function(plr) if plr:IsInGroup(GroupID) then do -- nubs plr:Kick("Noob") end end end)
Check the userId, if its not the userid you want to whitelist, then kick them, or make a table , you choose
with a unique user id
game:GetService("Players").PlayerAdded:Connect(function(plr) if plr:IsInGroup(GroupID) then do -- nubs if plr.UserId ~= (whitelistedUserId) then plr:Kick("Noob") end end end end)
with a table
local Whitelisted = {} -- put the user ids game:GetService("Players").PlayerAdded:Connect(function(plr) if plr:IsInGroup(GroupID) then do -- nubs if not Whitelisted[plr.UserId] then plr:Kick("Noob") end end end end)
If this helps please mark this as answered, it would help very much!
Your code seems alright, you just have to replace the GroupID
with ID of that group that can be found on the link when you get on group page.