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: Need a solution...

Previous Thread :: Next Thread 
Darwin12 is not online. Darwin12
Joined: 08 Nov 2009
Total Posts: 4395
11 Oct 2013 10:39 PM
Hey guys.
I'm trying to make a game script right now that changes the health when a particular user enters.

However; in tools, when I press "Play Solo" it does not work with this code:

function onPlayerEntered(newPlayer)
wait(0.01)
newPlayer.Character.Humanoid.MaxHealth = 1
newPlayer.Character.Humanoid.Health = 1
end

game.Players.PlayerAdded:connect(onPlayerEntered)

Any help would be great.
Report Abuse
Excellus is not online. Excellus
Joined: 17 Jun 2013
Total Posts: 3939
11 Oct 2013 10:40 PM
Needs to be a local script.
Report Abuse
1blockhead is not online. 1blockhead
Joined: 26 Aug 2008
Total Posts: 618
11 Oct 2013 10:41 PM
I've often found that PlayerAdded events don't work in solo mode.

~ Every time someone copies a game, a scripter dies.
Report Abuse
Darwin12 is not online. Darwin12
Joined: 08 Nov 2009
Total Posts: 4395
11 Oct 2013 10:42 PM
Ah! Good call!
Thanks for that; I'll give it a try!
Report Abuse
Project2015 is not online. Project2015
Joined: 11 Sep 2013
Total Posts: 384
11 Oct 2013 10:43 PM
PlayerAdded is not working on solo mode.
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