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
|
  |
| Joined: 17 Jun 2013 |
| Total Posts: 3939 |
|
|
| 11 Oct 2013 10:40 PM |
| Needs to be a local script. |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 11 Oct 2013 10:43 PM |
| PlayerAdded is not working on solo mode. |
|
|
| Report Abuse |
|
|