|
| 27 Dec 2015 12:28 PM |
| You know in misterobvious's YOLO obby, where once you die, the game shutsdown? I want a script that does that. Please help |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2015 12:30 PM |
player:kick()
im almighty salsa blackman R$14,132 Tx26,495 |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2015 12:38 PM |
| Are you sure that will work if the player dies? |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2015 12:40 PM |
player = game:GetService("Players").LocalPlayer
player.Character.Humanoid.Changed:connect(function() if player.Character.Humanoid.Health == 0 then player:Kick("You died") end end) |
|
|
| Report Abuse |
|
|
OzzyFin
|
  |
| Joined: 07 Jun 2011 |
| Total Posts: 3600 |
|
|
| 27 Dec 2015 12:46 PM |
| kick doesn't disconnect when called from client |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Dec 2015 12:48 PM |
-- put this script in StarterGui or StarterGear player = script.Parent.Parent
player.Character.Humanoid.Changed:connect(function() if player.Character.Humanoid.Health == 0 then player:Kick("You died") end end) |
|
|
| Report Abuse |
|
|
| |
|
OzzyFin
|
  |
| Joined: 07 Jun 2011 |
| Total Posts: 3600 |
|
|
| 27 Dec 2015 12:53 PM |
why would you ever want to run server scripts inside players, makes no sense
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(char) char.Humanoid.Died:connect(function() p:Kick() end) end) end) |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2015 01:02 PM |
| I woke up an hour ago. I'm not functioning right yet. But hey! If it works it works! |
|
|
| Report Abuse |
|
|