game:GetService("Players").PlayerAdded:Connect(function(plr)
if plr:IsInGroup(GroupID) then do -- nubs
plr:Kick("Noob")
end
end
end)
✓ ANSWER ACCEPTED
How do I make my group kick script not kick a certain person in the group that gets kicked?
2 answers
✓ Accepted answer
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.
1 comment
0
Also, if you mean to kick them if theyre not in a group, then do if (not plr:IsInGroup(groupid goes here))then plyr:Kick()
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Thank you