|
| 24 Jan 2016 07:05 PM |
game.Players.PlayerAdded:connect(function(player) wait(2) local character = player:WaitForChild("Character") local humanoid = character:WaitForChild("Humanoid") humanoid.Health = 0 end) |
|
|
| Report Abuse |
|
|
FrostOver
|
  |
| Joined: 20 Jun 2013 |
| Total Posts: 299 |
|
|
| 24 Jan 2016 07:07 PM |
| character is not a child of player it's a property |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2016 07:09 PM |
Well mb my idea is bad , but instead of using character i just create my own parameter by finding the player name in game like
game.Players.PlayerAdded:connect(function(player) local PlayerIG = game.Workspace:WaitForChild(player.Name) local hum = PlayerIG:FindFirstChild("Humanoid") hum.Health = 0 end) |
|
|
| Report Abuse |
|
|
FrostOver
|
  |
| Joined: 20 Jun 2013 |
| Total Posts: 299 |
|
|
| 24 Jan 2016 07:11 PM |
use repeat wait() until player.Character ~= nil |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2016 07:19 PM |
frost ik my stupid mistake! Could i just do instead of
local character = player:WaitForChild("Character")
shouldn't I do...
local character = player.Character |
|
|
| Report Abuse |
|
|