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: What be wrong with this o:?

Previous Thread :: Next Thread 
JonathanSwag is not online. JonathanSwag
Joined: 30 Aug 2011
Total Posts: 1012
10 Sep 2011 03:40 PM
function onPlayerEntered(newPlayer)
local a = p.Parent:findFirstChild("Humanoid")
if (a ~= nil) then
a.MaxHealth = 50
a.Health = 50

end
end
game.Players.ChildAdded:connect(onPlayerEntered)
Report Abuse
rpg877 is not online. rpg877
Joined: 14 Sep 2008
Total Posts: 447
10 Sep 2011 04:10 PM
i dont know the answere so im going to help by bumping since this is on the second page with no replies
Report Abuse
RoAnt is not online. RoAnt
Joined: 14 Jul 2008
Total Posts: 16794
10 Sep 2011 04:14 PM
You didn't define 'p'.

Here's mine:

game.Players.ChildAdded:connect(function (newPlayer)
local a = newPlayer.Character:FindFirstChild("Humanoid")
if a then
a.MaxHealth = 200
a.Health = 200
end
end)
Report Abuse
rpg877 is not online. rpg877
Joined: 14 Sep 2008
Total Posts: 447
10 Sep 2011 04:17 PM
your welcome :P
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