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: How to make a Team Only Starterpack

Previous Thread :: Next Thread 
UgOsMiLy is not online. UgOsMiLy
Joined: 15 Sep 2009
Total Posts: 2095
31 Oct 2013 04:22 AM
How do I make this script that if someone spawns in a team, they get some gear

Reason: I want red team to have a red sword and Blur team to have a blue one

Can you help me out?
Report Abuse
UgOsMiLy is not online. UgOsMiLy
Joined: 15 Sep 2009
Total Posts: 2095
31 Oct 2013 04:54 AM
bump
Report Abuse
UgOsMiLy is not online. UgOsMiLy
Joined: 15 Sep 2009
Total Posts: 2095
31 Oct 2013 05:42 AM
Pleease
Report Abuse
Speedhax4r is not online. Speedhax4r
Joined: 26 Jun 2012
Total Posts: 81
31 Oct 2013 05:49 AM
--Put this is StarterPack
Player = script.Parent.Parent
if Player.TeamColor == "Really Red" then --You have to set the right color.
game.Lighting.RedSword.Parent = Player.Backpack
elseif Player.TeamColor == "Blue" then --You have to set the right color.
game.Lighting.BlueSword.Parent = Player.Backpack
end
Report Abuse
BenBonez is not online. BenBonez
Joined: 29 Aug 2008
Total Posts: 19362
31 Oct 2013 05:52 AM
For example:

local teams = {}
teams["Bright red"] = {"Red Sword", "Red Gun"}
teams["Bright blue"] = {"Blue Sword", "Blue Gun"}

local tools = game.ServerStorage.Tools

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
player:WaitForChild("Backpack")
if teams[player.TeamColor] then
for i, tool in pairs(teams[player.TeamColor]) do
if tools:findFirstChild(tool) then
tools[tool]:Clone().Parent = player.Backpack
end
end
end
end)
end)
Report Abuse
UgOsMiLy is not online. UgOsMiLy
Joined: 15 Sep 2009
Total Posts: 2095
31 Oct 2013 06:55 AM
bump
Report Abuse
UgOsMiLy is not online. UgOsMiLy
Joined: 15 Sep 2009
Total Posts: 2095
03 Nov 2013 01:45 PM
BUUMP
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
03 Nov 2013 01:49 PM
on a general term,

put script into starterpack and put weapons inside the script

if script.Parent.Parent.TeamColor == BrickColor.new("Really red") then
for i,v in pairs(script:GetChildren()) do
v.Parent = script.Parent
end
end
Report Abuse
UgOsMiLy is not online. UgOsMiLy
Joined: 15 Sep 2009
Total Posts: 2095
03 Nov 2013 02:03 PM
Thank you
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