georgeba
|
  |
| Joined: 29 Oct 2011 |
| Total Posts: 1092 |
|
|
| 12 Apr 2014 08:30 PM |
So it's suppose to change the value when good == false, but it doesn't.
while true do wait() local good = false for _,v in pairs(game.Players:GetChildren()) do alive = v:FindFirstChild("Alive") if alive == false then if v.Name == script.Parent.ChosenValue.Value then if v.Alive.Value == true then good = true --a player is alive end end end end if good == false then ---no players are alive script.Parent.Game.Value = false end end |
|
|
| Report Abuse |
|
|
georgeba
|
  |
| Joined: 29 Oct 2011 |
| Total Posts: 1092 |
|
| |
|
|
| 12 Apr 2014 08:40 PM |
| YOU STOLE MY SCRIPT! SCRIPT STEALER! |
|
|
| Report Abuse |
|
|
georgeba
|
  |
| Joined: 29 Oct 2011 |
| Total Posts: 1092 |
|
| |
|
Foxconn
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 275 |
|
|
| 12 Apr 2014 08:40 PM |
| You have to set v.Alive.Value = true in order for the script to continue. |
|
|
| Report Abuse |
|
|
|
| 12 Apr 2014 08:41 PM |
| Liez. TheGamer101 Replied to me with this. You obviously did not use it right. |
|
|
| Report Abuse |
|
|
georgeba
|
  |
| Joined: 29 Oct 2011 |
| Total Posts: 1092 |
|
|
| 12 Apr 2014 08:43 PM |
| I have it set true, still, doesn't work. |
|
|
| Report Abuse |
|
|
Foxconn
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 275 |
|
|
| 12 Apr 2014 08:43 PM |
| No, if you read it correctly, there is one line that performs an IF function "if v.Alive.Value == true then". But nowhere else in the script is there a "v.Alive.Value = true". So it returns false and ends the script. |
|
|
| Report Abuse |
|
|
Foxconn
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 275 |
|
|
| 12 Apr 2014 08:46 PM |
Make the variable "alive" localized.
And for the v.Alive.Value, just use alive.Value. |
|
|
| Report Abuse |
|
|
georgeba
|
  |
| Joined: 29 Oct 2011 |
| Total Posts: 1092 |
|
|
| 12 Apr 2014 08:48 PM |
I have this, still doesn't work. while true do wait() local good = true local v.Alive.Value = true for _,v in pairs(game.Players:GetChildren()) do alive = v:FindFirstChild("Alive") if alive == false then if v.Name == script.Parent.ChosenValue.Value then if v.Alive.Value == true then good = true --a player is alive end end end end if good == false then ---no players are alive script.Parent.Game.Value = false end end |
|
|
| Report Abuse |
|
|
Foxconn
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 275 |
|
|
| 12 Apr 2014 08:50 PM |
while true do wait() local good = false for _,v in pairs(game.Players:GetChildren()) do alive = v:FindFirstChild("Alive") if alive == false then if v.Name == script.Parent.ChosenValue.Value then if alive.Value == true then good = true --a player is alive end end end end elseif good == false then ---no players are alive script.Parent.Game.Value = false end end |
|
|
| Report Abuse |
|
|
georgeba
|
  |
| Joined: 29 Oct 2011 |
| Total Posts: 1092 |
|
|
| 12 Apr 2014 08:51 PM |
| It says error at line 14 in Studio |
|
|
| Report Abuse |
|
|
Foxconn
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 275 |
|
|
| 12 Apr 2014 08:51 PM |
| It will also help you a lot if you have the Output window open. It's located the "view" tab. |
|
|
| Report Abuse |
|
|
georgeba
|
  |
| Joined: 29 Oct 2011 |
| Total Posts: 1092 |
|
|
| 12 Apr 2014 08:53 PM |
| Doesn't show anything in output. |
|
|
| Report Abuse |
|
|
Foxconn
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 275 |
|
|
| 12 Apr 2014 08:53 PM |
while true do wait() local good = false for _,v in pairs(game.Players:GetChildren()) do alive = v:FindFirstChild("Alive") if alive == false then if v.Name == script.Parent.ChosenValue.Value then if alive.Value == true then good = true --a player is alive end end elseif good == false then ---no players are alive script.Parent.Game.Value = false end end end |
|
|
| Report Abuse |
|
|
georgeba
|
  |
| Joined: 29 Oct 2011 |
| Total Posts: 1092 |
|
| |
|
georgeba
|
  |
| Joined: 29 Oct 2011 |
| Total Posts: 1092 |
|
| |
|
georgeba
|
  |
| Joined: 29 Oct 2011 |
| Total Posts: 1092 |
|
| |
|
Foxconn
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 275 |
|
|
| 12 Apr 2014 09:15 PM |
Make sure BoolValue "Alive" is true. And I'm assuming that the players don't start out dead. so good would have to be set to true. Hopefully this will work. If not, then I can't really help much more unless I had the actual model.
local good = true
while wait() and script.Parent.Game.Value == true do
for _,v in pairs(game.Players:GetChildren()) do local alive = v:FindFirstChild("Alive") if alive.Value == false and v.Name == script.Parent.ChosenValue.Value then good = false elseif alive.Value == true and v.Name == script.Parent.ChosenValue.Value then good = true end end if good == false then script.Parent.Game.Value = false end |
|
|
| Report Abuse |
|
|
Foxconn
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 275 |
|
|
| 12 Apr 2014 09:16 PM |
| Great! I hope I was able to help. |
|
|
| Report Abuse |
|
|
georgeba
|
  |
| Joined: 29 Oct 2011 |
| Total Posts: 1092 |
|
|
| 12 Apr 2014 10:07 PM |
| Oh no. It still doesn't work. |
|
|
| Report Abuse |
|
|
georgeba
|
  |
| Joined: 29 Oct 2011 |
| Total Posts: 1092 |
|
| |
|
georgeba
|
  |
| Joined: 29 Oct 2011 |
| Total Posts: 1092 |
|
| |
|
2unknown2
|
  |
| Joined: 30 Oct 2011 |
| Total Posts: 9351 |
|
|
| 13 Apr 2014 10:22 PM |
while true do wait() local good = false for i,v in pairs(game.Players:GetChildren()) do alive = v:FindFirstChild("Alive") if alive.Value == false then if v.Name == script.Parent.ChosenValue.Value then if v:findFirstChild("Alive").Value == true then good = true --a player is alive end end end end if good == false then ---no players are alive script.Parent.Game.Value = false end end |
|
|
| Report Abuse |
|
|
georgeba
|
  |
| Joined: 29 Oct 2011 |
| Total Posts: 1092 |
|
|
| 13 Apr 2014 10:31 PM |
| It doesn't understand alive on line 6 |
|
|
| Report Abuse |
|
|