kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 20 Jan 2013 11:50 AM |
In kinda new to if and then scripts so... i made this scirpt and i need you to fix it so it works.
function if script.parent.parent.Humanoid.Health = 0 then local h = Instance.new("Message") m.Parent = Workspace m.Test = ("you loose!") wait(5) m:Remove() end |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 20 Jan 2013 11:54 AM |
if script.parent.parent.Humanoid.Health == 0 then local h = Instance.new("Message", Workspace) h.Text = "you loose!" wait(5) h:Destroy() end |
|
|
| Report Abuse |
|
|
Taniss99
|
  |
| Joined: 15 Dec 2007 |
| Total Posts: 1707 |
|
|
| 20 Jan 2013 11:54 AM |
function --name? if (script.parent.parent.Humanoid.Health == 0) -- = is assignment == is test condition then local h = Instance.new("Message") m.Parent = Workspace m.Test = ("you loose!") wait(5) m:Remove() end
|
|
|
| Report Abuse |
|
|
Th30racle
|
  |
| Joined: 03 Nov 2012 |
| Total Posts: 214 |
|
|
| 20 Jan 2013 11:54 AM |
script.Parent = workspace This script would have to be inside a player. If it was inside a player, it would look like this:
if script.Parent.Humanoid.Health == 0 then local m = Instance.new("Message") m.Parent = game.Workspace m.Test = ("You lose!") wait(5) m:Remove() end |
|
|
| Report Abuse |
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
| |
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 20 Jan 2013 11:54 AM |
*
if script.Parent.Parent.Humanoid.Health == 0 then
|
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 20 Jan 2013 11:58 AM |
This script isent working...
if script.Parent.Parent.Humanoid.Health == 0 then local h = Instance.new("Message", Workspace) h.Text = "you loose!" wait(5) h:Destroy() end |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 20 Jan 2013 12:01 PM |
| sooooo no one is ganna help me? :( |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 20 Jan 2013 12:02 PM |
Then you parented this wrong.
if script.Parent.Parent.Humanoid.Health == 0 then
|
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 20 Jan 2013 12:04 PM |
IT still dont work.........................
if script.Parent.Parent.Humanoid.Health == 0 then local m = Instance.new("Message") m.Parent = game.Workspace m.Test = ("You lose!") wait(5) m:Remove() end |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
| |
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
| |
|