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 » Scripters
Home Search
 

Re: Can you tell me what is wrong with this script?

Previous Thread :: Next Thread 
cool1586 is online. cool1586
Joined: 11 Sep 2011
Total Posts: 54
20 Feb 2017 12:10 PM
So it changes the team but wont change back on reset.

for _, Player in pairs(game.Players:GetPlayers()) do
Player.TeamColor = BrickColor.new("Bright red")

Player.CharacterAdded:connect(function(Character)
Character.Humanoid.Died:connect(function()
Player.TeamColor = BrickColor.new("Fossil")
end)
end)
end


Report Abuse
sircfenner is not online. sircfenner
Joined: 29 Aug 2008
Total Posts: 2430
20 Feb 2017 12:41 PM
At what point are you running that script? If you run it when your player is already in the game, then it will wait until you *next* respawn (i.e. the first time your character is added since running the script) before it connects you to the Died event. So that would mean it only starts working the *second* time you die.
Report Abuse
cool1586 is online. cool1586
Joined: 11 Sep 2011
Total Posts: 54
20 Feb 2017 06:40 PM
It starts when players are teleport ed to the round/map


Report Abuse
cool1586 is online. cool1586
Joined: 11 Sep 2011
Total Posts: 54
20 Feb 2017 06:42 PM
I fixed this already thanks for ### help though!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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