of     1   

Yasune
#139214505Friday, July 04, 2014 3:11 PM GMT

I'm making a paintball game and I want the blue team to have a blue paintball gun and the red team to have a red paintball gun so how do I make a script so it makes it so that the blue team gets their gun and the red team gets their gun? Both of the guns are in the starterpack. And I'm a newbie at this so I don't know if I need to remove them from the starterpack or anything.
FauxHawke
#139214599Friday, July 04, 2014 3:12 PM GMT

-- Paste the tools inside the Team, and anyone who spawns with that TeamColor will get it for _, Player in ipairs(game.Players:GetPlayers()) do Player.CharacterAdded:connect(function() onCharacterAdded(Player) end) end function onPlayerAdded(Player) Player.CharacterAdded:connect(function() onCharacterAdded(Player) end) end game.Players.PlayerAdded:connect(onPlayerAdded) function onCharacterAdded(Player) for _, Team in ipairs(game.Teams:GetChildren()) do if Team.TeamColor == Player.TeamColor then for _, Object in ipairs(Team:GetChildren()) do Object:Clone().Parent = Player.Backpack end break end end end
Yasune
#139224545Friday, July 04, 2014 5:27 PM GMT

Do I put the script in the gun, team, or explorer?
Yasune
#139274311Saturday, July 05, 2014 2:37 AM GMT

Bump
nobbers12345
#139274439Saturday, July 05, 2014 2:39 AM GMT

"-- Paste the tools inside the Team, and anyone who spawns with that TeamColor will get it" I hate the LGBT. Those laser guided battle tanks are just too damn powerful.
Cereal_Tree
#139274482Saturday, July 05, 2014 2:39 AM GMT

I'm assuming gun, I dunno how to script so if I break your game... SORRY!
Yasune
#139656317Tuesday, July 08, 2014 5:18 PM GMT

Bump
FauxHawke
#140218825Sunday, July 13, 2014 7:32 PM GMT

put it in a script in workspace

    of     1