l0lzz
|
  |
| Joined: 05 Dec 2009 |
| Total Posts: 1529 |
|
|
| 05 Mar 2012 11:37 AM |
The time goes down but it never destroys its parent, when it hits 0 it goes back to 20 and stays there.
Gate = game.Workspace.Gate Text = script.Parent.Frame.TimeLeft Time = Gate.Time
while wait() do repeat wait(1) Text.Text = Time.Value until Time.Value == 0 script.Parent:Destroy() end
|
|
|
| Report Abuse |
|
|
|
| 05 Mar 2012 11:41 AM |
| Dont have the while-do loop then. |
|
|
| Report Abuse |
|
|
l0lzz
|
  |
| Joined: 05 Dec 2009 |
| Total Posts: 1529 |
|
|
| 05 Mar 2012 11:42 AM |
Still doesn't destroy it...
|
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 05 Mar 2012 11:44 AM |
Is the script in workspace? Are you trying to remove the script or it's first ascendant?
"Bro five! Wear this to let everyone know you think they deserve a high five." |
|
|
| Report Abuse |
|
|
l0lzz
|
  |
| Joined: 05 Dec 2009 |
| Total Posts: 1529 |
|
|
| 05 Mar 2012 11:46 AM |
| I got it to delete while it's in the player's PlayerGui, but how do I remove it from StarterGui? |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 05 Mar 2012 11:47 AM |
It doesn't run in StarterGui
"Bro five! Wear this to let everyone know you think they deserve a high five." |
|
|
| Report Abuse |
|
|
l0lzz
|
  |
| Joined: 05 Dec 2009 |
| Total Posts: 1529 |
|
|
| 05 Mar 2012 11:50 AM |
| So I put I cloned the Gui from lighting into each person then put it in StarterGui in case they died. I need it to destroy in StarterGui when the gate is repaired.... |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 05 Mar 2012 11:57 AM |
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) if gate is not destroyed then --Obviously change game.Lighting.Gui:clone().Parent=plr.PlayerGui end end) end)
"Bro five! Wear this to let everyone know you think they deserve a high five." |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 05 Mar 2012 11:58 AM |
"if gate is not destroyed then --Obviously change "
Oops, 'Destroyed' as in the event. Instead do "if gate then"
"Bro five! Wear this to let everyone know you think they deserve a high five." |
|
|
| Report Abuse |
|
|
|
| 05 Mar 2012 12:01 PM |
"if gate is not destroyed then"
uumg syntax error blahblah expected around blahblah and blahblah |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 05 Mar 2012 12:02 PM |
One line of pseudocode is quite misunderstanding, indeed.
"Bro five! Wear this to let everyone know you think they deserve a high five." |
|
|
| Report Abuse |
|
|
|
| 05 Mar 2012 12:05 PM |
"Why won't this script destroy its parent?"
Since when are children expected to kill members of their family? |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
| |
|
|
| 05 Mar 2012 12:08 PM |
@su8
Erm, but, why would the script be mad at its parent? Just because a certain gate has been destroyed?
Oh, I think I understand! The gate was a friend of the script and the _GUI_ destroyed the gate?
Wait, the > GUI < destroyed the gate? Since when can a _GUI_ destroy a gate?
No, no... wait, wait... hum... |
|
|
| Report Abuse |
|
|
l0lzz
|
  |
| Joined: 05 Dec 2009 |
| Total Posts: 1529 |
|
|
| 05 Mar 2012 12:08 PM |
Ok so back on topic. xD The Gui won;t clone into the player?
Gate = script.Parent Health = Gate.Health Gui = game.Lighting.TimeLeftGui
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) if Health.Value == 0 then Gui:Clone().Parent = plr.PlayerGui end end) end) |
|
|
| Report Abuse |
|
|
l0lzz
|
  |
| Joined: 05 Dec 2009 |
| Total Posts: 1529 |
|
| |
|