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: PlayerAdded

Previous Thread :: Next Thread 
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
14 Sep 2012 11:40 PM
Game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(chr)
if chr.Head.BrickColor == BrickColor.new("Really red") then
chr.Humanoid.Health = 10
elseif chr.Head.BrickColor == BrickColor.new("Really green") then
chr.Humanoid.Health = 30
elseif chr.Head.BrickColor == ("White") then
chr.Humanoid.Health = 1
else
chr.Humanoid.Health = .123456789
end
end)
end)
_________________________
Where would I add variables for "chr.Head.BrickColor" and "chr.Humanoid.Health"?
Would I add that to the top of the script or after the functions?
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
14 Sep 2012 11:43 PM
Add it when the characteradded event is checked.
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
14 Sep 2012 11:44 PM
Okay.
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