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: Programing Certian items to Certian spawns..

Previous Thread :: Next Thread 
Conqueror14 is not online. Conqueror14
Joined: 18 Dec 2011
Total Posts: 70
29 Dec 2011 06:31 PM
Hey, I've been trying to do this for too long now, but, how can you program some items to certian spawns? Like, for exmple, if I wanted to have teh raiders spawn get an MG and the Defender spawn get a sniper, Starter pack wont do that. Itll give both teams both weapons. So, how can I program where only people on the raiders team get an MG or only a Defenders gets a Sniper?
(Note: This isn't what I wanna do, its not an MG or a sniper, thats just an example)
Could the ROBLOX community be nice and give me some pointers??
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
29 Dec 2011 06:50 PM
You mean like a "Team starter pack"?

~ [I don't script scripts; I script IMPORTED scripts.] ~
Report Abuse
Conqueror14 is not online. Conqueror14
Joined: 18 Dec 2011
Total Posts: 70
29 Dec 2011 06:52 PM
Yea yea team starter pack
Report Abuse
jode6543 is not online. jode6543
Joined: 16 Jun 2009
Total Posts: 5363
29 Dec 2011 06:55 PM
Assuming you have a team selector already:

game.Players.PlayerAdded:connect(function(p)
wait(1) --Wait for the game to assign them to a team...
--GIVE THEM STUFF HERE
p.Character.Humanoid.Died:conect(function()
--GIVE THEM STUFF AGAIN
end)
end)
Report Abuse
jode6543 is not online. jode6543
Joined: 16 Jun 2009
Total Posts: 5363
29 Dec 2011 06:56 PM
Wait:
if p.TeamColor == thingie then
--stuff 1
else
--stuff 2
end
Report Abuse
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
29 Dec 2011 06:56 PM
game.Players.PlayerAdded:connect(function(player) end)

Try that and add all the stuff you want in their player startergear.
Report Abuse
Conqueror14 is not online. Conqueror14
Joined: 18 Dec 2011
Total Posts: 70
29 Dec 2011 06:59 PM
Now what do you mean by "thingies"? And you add that script into the team change GUI? or Starter GUI?
Report Abuse
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
29 Dec 2011 06:59 PM
@jode, Yours would be incredibly stupid, as you only need to put gear in startergear.

game.Players.PlayerAdded:connect(function(p)
wait(1)
if p.Character == nil then return end
--GIVE THEM STUFF HERE AND PUT IT IN STARTERGEAR
end)

EFFICIENCY!
Report Abuse
Conqueror14 is not online. Conqueror14
Joined: 18 Dec 2011
Total Posts: 70
29 Dec 2011 07:00 PM
Also, I dont have a team selector, I have spawns and a Team Change GUI where you click which team to be on and if you are in that group then itll kill you and switch teams...So then what do i do?
Report Abuse
ggfunny1234 is not online. ggfunny1234
Joined: 09 Jul 2010
Total Posts: 3432
29 Dec 2011 07:03 PM
Click once on the Raider team

Insert>Object>TeamStarterPack

Do the same for the other one
Report Abuse
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
29 Dec 2011 07:05 PM
@jode, this'd be better for his level of scripting


TEAMCOLOR = "" -- Bright red, Bright blue, Black, ...
TEAMCOLOR2 = "" -- Bright green, Bright yellow, ...
item1 = game.Lighting.Item1
item2 = game.Lighting.Item2

game.Players.PlayerAdded:connect(function(p)
wait(1)
if p.Character == nil then return end
if p.TeamColor == BrickColor.new(TEAMCOLOR) then
item1:Clone().Parent = p.StarterGear
item1:Clone().Parent = p.Backpack
elseif p.TeamColor == BrickColor.new(TEAMCOLOR2) then
item2:Clone().Parent = p.StarterGear
item2:Clone().Parent = p.Backpack
end
end)

@threadcreator,
you never said anything 'bout gui's right?
Report Abuse
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
29 Dec 2011 07:07 PM
@threadcreator,
actually request are not allowed here, I'm sorry.
Report Abuse
Conqueror14 is not online. Conqueror14
Joined: 18 Dec 2011
Total Posts: 70
29 Dec 2011 07:17 PM
?? This isnt a request, I just need help.
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