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: Why won't this On Death Team Switch work?

Previous Thread :: Next Thread 
YourStoneMaster is not online. YourStoneMaster
Joined: 29 Mar 2013
Total Posts: 401
26 Apr 2014 11:42 PM
So basically, it's supposed to switch you to the white team when you die if your on green or red. Help me fix it please!


game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Char)
Char.Humanoid.Died:connect(function()
if Player.TeamColor == BrickColor.new("Bright red") then
Player.TeamColor = BrickColor.new("White")
if Player.TeamColor == BrickColor.new("Medium green") then
Player.TeamColor = BrickColor.new("White")
end
end
end) end) end)
Report Abuse
YourStoneMaster is not online. YourStoneMaster
Joined: 29 Mar 2013
Total Posts: 401
26 Apr 2014 11:55 PM
BUMP!
Report Abuse
YourStoneMaster is not online. YourStoneMaster
Joined: 29 Mar 2013
Total Posts: 401
27 Apr 2014 01:30 AM
Please help!
Report Abuse
YourStoneMaster is not online. YourStoneMaster
Joined: 29 Mar 2013
Total Posts: 401
27 Apr 2014 02:08 AM
Bump2
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
27 Apr 2014 02:18 AM
Game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
Connection = Character.Humanoid.Died:connect(function()
Player.TeamColor = BrickColor.new("White")
Connection:disconnect()
end)
end)
end)
Report Abuse
YourStoneMaster is not online. YourStoneMaster
Joined: 29 Mar 2013
Total Posts: 401
27 Apr 2014 03:07 AM
I only want this script to affect the red team players, not everyone.
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
27 Apr 2014 03:08 AM
Game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
Connection = Character.Humanoid.Died:connect(function()
if Player.TeamColor = BrickColor.new("Bright red") then
Player.TeamColor = BrickColor.new("White")
Connection:disconnect()
end
end)
end)
end)
Report Abuse
YourStoneMaster is not online. YourStoneMaster
Joined: 29 Mar 2013
Total Posts: 401
27 Apr 2014 11:34 AM
Thanks I'll try that.
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