I have a game that prints a players name when they are in 2 groups. It flags them and then prints the game.
The script works but only for you when you join the server. My issue is that its printing me but not the whole group and that’s what I need help with.
This is my code:
-- Groups --
local NRB = 4734688 --NRB = Nighthawk Reaper Battalion--
local RC = 3880488 --RC = Red Cell-- --For Now it is TNI--
local RCSF = 4236314 --RCSF = Red Cell Special Forces--
local RCSF:P = 5306090 --RCSF:P = Red Cell Special Forces: Phantoms--
local RCT = 4924452 --RCT = Red Cell Templars--
local RCT:C = 6920519 --Red Cell Templars: Chevaliers--
--Flags--
local Flag1 = "Player in NRB and RC"
local Flag2 = "Player also in RCSF"
local Flag3 = "Player also in RCSF:P"
local Flag4 = "Player also in RCT"
local Flag5 = "Player also in RCT:C"
--Checking Procces--
print("Scanning for corruptions in NRB. Please Stand by.")
--Main Code--
game.Players.PlayerAdded:Connect(function(Player)
if Player:IsInGroup(NRB) and Player:IsInGroup(RC) then
print("Detected Curruption.")
print("Player: "..Player.Name.."Flagged. Reason: ", Flag1)
if Player:IsInGroup(RCSF) then
print("Player: "..Player.Name.."Flagged. Reason: ", Flag2)
end
if Player:IsInGroup(RCSF:P) then
print("Player: "..Player.Name.."Flagged. Reason: ", Flag3)
end
if Player:IsInGroup(RCT) then
print("Player: "..Player.Name.."Flagged. Reason: ", Flag4)
end
if Player:IsInGroup(RCT:C) then
print("Player: "..Player.Name.."Flagged. Reason: ", Flag5)
end
else
print("Scanned for curruptions. No one was flagged.")
end
end)
This is what happens.
So what i’m asking for help is. How do I make it check the whole group and not just me? I got told “You’d need to use HTTPService then I believe if you want to detect all players inside a group. You’ll have to use a proxy though, since using it inside of ROBLOX URLs/Domains will not be allowed”
Because I want it to check the whole group. This way I can see all players that I shall ban for breaking rules. This way is faster than checking each individual player.
I’m confused. You are checking the whole group as soon as a player joins. If you want to ban a player or any player that’s in the group, just add player:Kick() under the first if statement; any player that joins that’s in the group will show up there – it doesn’t really make sense to traverse the entire group and make a table of those players because you’d have to check that before banning a player anyways.
Ok ill explain. I’m in a group that is very strict (NRB). It is again the rules to be in the enemy group (RC). I want a way for checking if players are in both group and if they are. Officers can punish them. I don’t wont bans from roblox groups or the game. I only want it to print all players in both groups that get flagged. This is the ui:
what you can do then is add all of your conditions when the player joins, like you have, and add them to dictionary that you can index when you scan for corruption
edit: add the player^
When a player gets flagged, their ID is put into the datastore. When you scan, you’d make a table of every player in the table then scan from the table.
local RCSF = 4236314 --RCSF = Red Cell Special Forces--
local RCSF:P = 5306090 --RCSF:P = Red Cell Special Forces: Phantoms--
local RCT = 4924452 --RCT = Red Cell Templars--
local RCT:C = 6920519 --Red Cell Templars: Chevaliers--
Print the extra flags if there are any
local Flag2 = "Player also in RCSF"
local Flag3 = "Player also in RCSF:P"
local Flag4 = "Player also in RCT"
local Flag5 = "Player also in RCT:C"
I copy the names from the output/console and report the to hicom to get them exiled.