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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|