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: Could use some help with this:

Previous Thread :: Next Thread 
EchoDuplication is not online. EchoDuplication
Joined: 04 Apr 2013
Total Posts: 13205
04 Sep 2013 11:13 PM
It isn't working, it spawns the tool on join, rather than on reset, so when you change teams, it gets all messed up, can anyone fix this?



redtools={"RedKatana"}
bluetools={"YellowKatana"} -- (Yellow)
-------------------------------------------------------------------------------------------------------------------------------------------


function spawn(SP)
if SP.Neutral then
if SP.TeamColor==BrickColor.new("Bright red") then
for i=1, #redtools do
local tool=game.Lighting:FindFirstChild(redtools[i])
if tool~=nil then
tool:clone().Parent=SP.Backpack
end
end
end
if SP.TeamColor==BrickColor.new("Bright yellow") then
for i=1, #bluetools do
local tool=game.Lighting:FindFirstChild(bluetools[i])
if tool~=nil then
tool:clone().Parent=SP.Backpack

end
end
end
end
end

function onPlayerEntered(NewPlayer)
newPlayer.Changed:connect(function(C) if C=="Character" then spawn(NewPlayer) end end)
end

game.Players.ChildAdded:connect(onPlayerEntered)


~!!ECHO ECHO ECHO ECHO!!~
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
04 Sep 2013 11:14 PM
Output?
Report Abuse
EchoDuplication is not online. EchoDuplication
Joined: 04 Apr 2013
Total Posts: 13205
04 Sep 2013 11:16 PM
There is no output?

~!!ECHO ECHO ECHO ECHO!!~
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
04 Sep 2013 11:19 PM
Why do you have to If statements in a row?
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