|
| 05 Jul 2013 09:51 AM |
function -- what is it? game.Players.LocalPlayer.TeamColor = BrickColor.new("White")
|
|
|
| Report Abuse |
|
|
| |
|
Thaeh
|
  |
| Joined: 05 Feb 2011 |
| Total Posts: 7685 |
|
|
| 05 Jul 2013 09:53 AM |
| It's a method of the humanoid; Died. |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2013 09:54 AM |
uhh idk what that is i started scripting 3 days ago qq |
|
|
| Report Abuse |
|
|
Thaeh
|
  |
| Joined: 05 Feb 2011 |
| Total Posts: 7685 |
|
|
| 05 Jul 2013 09:57 AM |
http://wiki.roblox.com/index.php/Died_(Event)
Yes, it's an event, not a method. My bad. |
|
|
| Report Abuse |
|
|
| |
|
|
| 05 Jul 2013 10:07 AM |
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) while not c:FindFirstChild("Humanoid") do wait() end c.Humanoid.Died:connect(function()
-- Do whatcha want here.
end) end) end) |
|
|
| Report Abuse |
|
|
OKevinO
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1036 |
|
|
| 05 Jul 2013 11:09 AM |
player = game.Players.LocalPlayer.Character
while true do wait() hum = player:findFirstChild("Humanoid") if hum ~= nil then if hum.Health == 0 then --do stuff here end end
a while true do loop will work just as fine as a function, except it is more simple to do i guess?
♫~DUBSTEP ]V[AY RULE THE WORLD~♫ |
|
|
| Report Abuse |
|
|
OKevinO
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1036 |
|
|
| 05 Jul 2013 11:09 AM |
player = game.Players.LocalPlayer.Character
while true do wait() hum = player:findFirstChild("Humanoid") if hum ~= nil then if hum.Health == 0 then --do stuff here end end end
forgot to add another end!! my bad! ♫~DUBSTEP ]V[AY RULE THE WORLD~♫ |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2013 12:37 PM |
[Local Script inside the player]
script.Parent.Died:connect(function() --stuff here end
dunno>yolo |
|
|
| Report Abuse |
|
|
btft
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 1512 |
|
|
| 05 Jul 2013 12:44 PM |
:O LOL --localscript in the player player=game:service'Players'.LocalPlayer char = player.Character repeat wait() until player and char char.Died:connect(function() print'dead deal' end)
|
|
|
| Report Abuse |
|
|
btft
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 1512 |
|
|
| 05 Jul 2013 12:45 PM |
:O LOL Sorry, forgot a bit. --localscript in the player player=game:service'Players'.LocalPlayer char = player.Character repeat wait() until player and char char:WaitForChild("Humanoid").Died:connect(function() print'dead deal' end)
|
|
|
| Report Abuse |
|
|