I’ve created a basic script to save people time when trying to blacklist certain groups. I decided to release it public and i’m planning on making more useful resources to help upcoming developers! The group i’ll be housing this under is Models4You!
Simply edit the group IDs located in this variable to the ones you want to blacklist. Put the blacklist in ServerScriptService and you should be good to go!
local groupBlackList = {3514227 , 7} -- Replace the IDs with the IDs of the groups you want to blacklist.
To find the ID of a group. Simply go to the groups page and copy this part of the URL.
Link to model:
(I know this is a very easy script, but it might save someone some time coding it! )
May I just ask out of curiosity what is the purpose of this?
In my opinion it only will reduce your player counts and result in people who may have liked your game, instantly disliking it due to being kicked when joining.
I understand it Amy be to prevent trolls / certain types of communities from playing your game. But in terms of statistics I feel it does more harm then good.
I personally would never use a script like this but
For a game that’s just a “hangout” - there may be a certain group that go around trolling. I’ve seen a lot of this where everyone joins one group and dresses up the same and goes and trolls at cafes etc.
I’d like to point out that I think the intent of this script is to remove (kick every time) players in a group that stole assets from the game, highly disruptive, or a roleplay ending for groups that roleplay is vital for them. It may not be for you but it’s a great add-on for new beginners to learn.
You can also create a script where users account age have to be above 30 days to join or else kicked.
I agree, but not to be rude or anything you can’t get your game moderated or anything, this Group Blacklist script and the account age can provent:
Raids
Alt exploiters
Alt accounts that had there main account bannned
Hold on… You’re accusing this user of copy code that someone gave you on your thread. When this user created this thread a day before you. And this code is nothing alike. Just to show, so you can’t argue anymore.
Below is the code you’re saying demofocus has copied.
local bannedGroups = {}
local GroupService = game:GetService("GroupService")
game:GetService("Players").PlayerAdded:Connect(function(player)
local playerIsInGroups = GroupService:GetGroupsAsync(player.UserId)
for _,currentGroup in pairs(playerIsInGroups) do
for i,currentBannedGroup in pairs(bannedGroups) do
if currentGroup.Id == currentBannedGroup then
player:Kick("Please leave the group "..currentGroup.Name.." to join this game.")
end
end
end
end)
And the code below this comment is obviously demofocus again.
--[[ Made by demofocus for Models4U - Insert into serverscriptservice and it should be good to go!--]]
local groupBlackList = {3514227 , 7} -- Add group IDs here. I've used Roblox + Devforum as an example.
game.Players.PlayerAdded:Connect(function(plr)
for i,v in pairs(groupBlackList) do
if plr:IsInGroup(v) then
plr:Kick("You are in a blacklisted group!")
end
end
end)
At which part are you confused on him copying another users code?
I don’t see a good point on why other people should blacklist groups especially when you have members in your group that are apart of the blacklist. That is just bad game design and not a welcoming situation when you instantly just get kicked cuz you are apart of a fan group. I get it that you don’t want certain type of toxic communities and trolling communities but at the same time that will just ruin your game reputation. I highly encourage you not to add a blacklist script for any major project or public game. Especially if it’s a featured or front page game. Other than that great work and cheers!
Many games I’ve played on have account age limiters and they seem to be fine. I wouldn’t suggest having an age limit of 30 days though, that will likely just drive new Roblox players away from the game if they have no malicious intent. A limiter of about 3 days or so would be much better, as even just a few days can bore alt raiders.
Roblox has preciously taken action against models (like Adonis Admin) which implement age limits. The precedent amongst both Roblox and developers is that age limits are not allowed.