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
 

How do I give each team a certain weapon?

Previous Thread :: Next Thread 
llcoolj03 is not online. llcoolj03
Joined: 20 Nov 2011
Total Posts: 6135
19 May 2014 02:07 AM
I am making a guns vs swords game, and I don't know how to give Guns guns and swords swords
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
19 May 2014 02:12 AM
Why are you making it then?
Report Abuse
Phyclops is not online. Phyclops
Joined: 27 Sep 2012
Total Posts: 5895
19 May 2014 02:18 AM
what vlek said
Report Abuse
uyoyalt is not online. uyoyalt
Joined: 16 Apr 2013
Total Posts: 2860
19 May 2014 02:22 AM
for i,v in pairs(game.Players:GetChildren()) do
if v.TeamColor == BrickColor.new("Bright red") then
game.Lighting.LinkedSword:clone().Parent = v.Backpack
elseif v.TeamColor == BrickColor.new("Bright blue") then
game.Lighting.Gun:clone().Parent = v.Backpack
end
end
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
19 May 2014 02:23 AM
^

You could also usse GetPlayers()
Report Abuse
uyoyalt is not online. uyoyalt
Joined: 16 Apr 2013
Total Posts: 2860
19 May 2014 02:23 AM
I would like to use GetChildren() though.
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
19 May 2014 02:26 AM
Instance.new("IntValue", game.Players) > crash
Report Abuse
uyoyalt is not online. uyoyalt
Joined: 16 Apr 2013
Total Posts: 2860
19 May 2014 02:26 AM
What was your point?
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
19 May 2014 02:29 AM
You scripts might not work because of other values in it.
Learn it while you can, you also get less lagg.
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