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: need help with a game

Previous Thread :: Next Thread 
crazyboymanguy is not online. crazyboymanguy
Joined: 07 Nov 2010
Total Posts: 272
01 Oct 2011 11:00 PM
i need to know how to give dif gear to dif teams like you start on one team and u have a sword and then you go to the other one and u have a gun how do u do that?
Report Abuse
zazw3 is not online. zazw3
Joined: 05 Jul 2008
Total Posts: 1238
02 Oct 2011 01:24 AM
I dont know how everyone else does it but I would:

Check to see what team each player is in...
If there in certain team copy and paste that teams gear into their starterpack
so on...


Or you might just turn spawn into a giver but thats not really as good...
Report Abuse
eJorge is not online. eJorge
Joined: 09 Jun 2011
Total Posts: 5966
02 Oct 2011 02:41 AM
team1 = "Bright blue"
team2 = "Bright red"
game.Players.PlayerAdded:connect(function(Player)
local choose = math.random(0,1)
if choose == 0 then
Player.TeamColor = BrickColor.new(team1)
game.Lighting.Sword:clone().Parent = Player.StarterGear
elseif choose == 1 then
Player.TeamColor = BrickColor.new(team2)
game.Lighting.Gun:clone().Parent = Player.StarterGear
end
end)
Report Abuse
eJorge is not online. eJorge
Joined: 09 Jun 2011
Total Posts: 5966
02 Oct 2011 02:41 AM
Something like that.
Report Abuse
kingmod123 is not online. kingmod123
Joined: 16 May 2009
Total Posts: 699
02 Oct 2011 03:07 AM
local teams = {"Bright red", "Bright blue"}
game.Players.PlayerAdded:connect(function(plr)
chooseteam = teams[math.random(1, #teams)]
for i = 1, #chooseteam do
if i == chooseteam[1] and plr.TeamColor == i then
game.Lighting.Sword:clone().Parent = plr.StarterPack
end
if i == chooseteam[2] and plr.TeamColor == i then
game.Lighting.Gun:clone().Parent = plr.StarterPack
end
end
end)
Report Abuse
crazyboymanguy is not online. crazyboymanguy
Joined: 07 Nov 2010
Total Posts: 272
22 Oct 2011 07:45 AM
ok thnks
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