Group Blacklist

So if someone is in a blacklisted group, They get kicked. Like If You join my game, And you are in a blacklisted group, you will get kicked. Anyone be able to help?

Try detecting if the user is in the group and if they are, kick them.

It would be something along these lines, but i’m not a scripted, so it won’t work.

if Player:GetRankInGroup(groupid) then

kick “blacklisted”

Does anyone have like a full script that works then?

Put this in Server Script Service:

-- This code sets up an event connection for when a player is added to the game
	-- Check if the newly added player is in group with ID 7
	if player:IsInGroup(7) then
		-- If the player is in the group, they will be kicked with a reason "In blacklisted group!"
		player:Kick("In blacklisted group!")

If this fixes your problem mark it as solution! :white_check_mark:

Thanks cookie! I will test it later.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.