generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Club Houses » Clans & Guilds
Home Search
 

Does anyone have a group-lock script

Previous Thread :: Next Thread 
Praetorius is not online. Praetorius
Joined: 05 Dec 2012
Total Posts: 1886
06 Jan 2017 05:33 PM
So that only members of a specific group could join the game?

I need one for the AC-SURGE war.


Report Abuse
Insurrect is not online. Insurrect
Joined: 04 Oct 2013
Total Posts: 22734
06 Jan 2017 05:34 PM
bump
Report Abuse
PirateAtSea is not online. PirateAtSea
Joined: 25 Dec 2015
Total Posts: 2647
06 Jan 2017 05:37 PM
local Players = game:GetService("Players")
local SURGEid = --insert the SURGE group ID here
local ACid = --insert the AC group ID here

PlayersAllowed = {}

Players.PlayerAdded:Connect(function(Player)
PlayersAllowed[#PlayersAllowed + 1] = Player.Name
if Player:GetRankInGroup == SURGEid or ACid then
Player:Destroy()
end)
Report Abuse
TENSHl is not online. TENSHl
Joined: 16 May 2014
Total Posts: 5520
06 Jan 2017 05:39 PM
Make sure you include Resade and Could 9 in the list of groups that can join.


Report Abuse
PirateAtSea is not online. PirateAtSea
Joined: 25 Dec 2015
Total Posts: 2647
06 Jan 2017 05:41 PM
oh wait my code isn't right hold on, lemme think
Report Abuse
TENSHl is not online. TENSHl
Joined: 16 May 2014
Total Posts: 5520
06 Jan 2017 05:42 PM
Oh yeah also FoL but you don't have to allow main RAT.


Report Abuse
nitroyoshi9 is not online. nitroyoshi9
Joined: 17 Jun 2011
Total Posts: 45664
06 Jan 2017 05:44 PM
https://www.roblox.com/develop/library?CatalogContext=2&Category=6&Keyword=group%20whitelist
Report Abuse
55Altair is not online. 55Altair
Joined: 18 Oct 2008
Total Posts: 6272
06 Jan 2017 05:49 PM
game.Players.PlayerAdded:connect(function(p)
repeat wait() until p ~= nil -- wait until they load
if not p:IsInGroup(AC group ID) or not p:IsInGroup(SURGE group ID) then -- if they aren't in AC or aren't in SURGE kick em
p:Kick()
end
end)
Report Abuse
PirateAtSea is not online. PirateAtSea
Joined: 25 Dec 2015
Total Posts: 2647
06 Jan 2017 05:51 PM
altair... your syntax is triggering me...
Report Abuse
ImperialOutcast is not online. ImperialOutcast
Joined: 24 Nov 2009
Total Posts: 12054
06 Jan 2017 05:53 PM
local GroupId = 0000

game.Players.PlayerAdded:connect(function(plr)
if not plr:IsInGroup(GroupId) then
plr:Kick("Entrance Denied")
end
end)
Report Abuse
ImperialOutcast is not online. ImperialOutcast
Joined: 24 Nov 2009
Total Posts: 12054
06 Jan 2017 05:57 PM
For multiple groups:


local Groups = {0000,0000,0000}

local function InGroup(Player)
for i = 1,#Groups do
if Player:IsInGroup(Groups[i]) then
return true
end
end
return false
end

game.Players.PlayerAdded:connect(function(Player)
if not InGroup(Player) then
Player:Kick("Denied Access")
end
end)
Report Abuse
55Altair is not online. 55Altair
Joined: 18 Oct 2008
Total Posts: 6272
06 Jan 2017 05:58 PM
whats wrong with it
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » Clans & Guilds
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image