|
| 20 Jun 2013 01:45 PM |
function onTouch(part) wait(0.01) local gui = script.Parent.DeathGui:clone() gui:clone().Parent = game.StarterGui local humanoid = part.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then -- if a humanoid exists, then humanoid.Health = 0 wait(2) gui:remove() end end
script.Parent.Touched:connect(onTouch)
This script was supposed to show a gui when touched and die, but the player dies first and shows the gui when respawned and won't remove after 2 seconds... Help!!! Major Change it if needed, thnx guys... |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
Preston99
|
  |
| Joined: 21 Sep 2008 |
| Total Posts: 247 |
|
|
| 20 Jun 2013 02:49 PM |
| You're putting it in the startergui, not the PlayerGui. Put it in the PlayerGui of the player. That's why it's not working. |
|
|
| Report Abuse |
|
|