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 » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Group only gear

Previous Thread :: Next Thread 
koma79 is not online. koma79
Joined: 15 Jul 2009
Total Posts: 1391
29 Dec 2012 01:19 PM
Can anyone make me a script that allows a weapon to be only for your group when you enter the game?

Like that only gives your group members the gear.
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
29 Dec 2012 01:27 PM
Put all the gear in Lighting.

GroupId = 00000 -- Your group's ID here
Gear = {"Gun1", "Gun2"} --Put the name of the gear here

game.Players.PlayerAdded:connect(function(plyr)
if plyr:IsInGroup(GroupId) then
for i,v in pairs (Gear) do
if game.Lighting:FindFirstChild(v) then
x = game.Lighting:FindFirstChild(v):clone()
x.Parent = plyr.Backpack
end
end
end
end

That should work, I haven't tested it though.
Report Abuse
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
29 Dec 2012 01:27 PM
local gid =
game:service("Players").PlayerAdded:connect(function(p)
if p:IsInGroup(gid) then
for _,v in pairs(game.Lighting.Weapons:children()) do
v:Clone().Parent = p.StarterGear
end
end
end)

create a model in lighting called 'Weapons'. Add all of the weapons you want the group members to have in there.
Report Abuse
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
29 Dec 2012 01:28 PM
woops sorry late post
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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