miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 18 Sep 2011 07:26 PM |
Ok, I made a soccer game that after 600 seconds it says who won. But I had to change that because it was changing.I made a countdown and the second were off every round.So I made this script. Where it says the winner when the hints script was to 0 and 1 second later the value went back to zero.WHy won't it work?
repeat wait() until game.Players.NumPlayers >=2 for i,v in pairs(game.Workspace:GetChildren()) do B = v:FindFirstChild("Count") if B.Text == "0:0" then--This is what I meant local Message = Instance.new("Message", Workspace) for i,v in pairs(game.Players:GetPlayers()) do if v:findFirstChild("leaderstats") then if v.leaderstats["Magma Goals"].Value > v.leaderstats["Squirter Goals"].Value then Message.Text = "Team Magma Wins!" wait(2) Message:Remove() elseif v.leaderstats["Squirter Goals"].Value > v.leaderstats["Magma Goals"].Value then Message.Text = "Team Squirter Wins!" wait(2) Message:Remove() end end end end end wait(1) --The value part for i,v in pairs(game.Players:GetPlayers()) do if v:findFirstChild("leaderstats") then v.leaderstats["Magma Goals"].Value = 0 v.leaderstats["Squirter Goals"].Value = 0 end end
This is my 3rd time posting this.No one is answering me! |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 18 Sep 2011 07:26 PM |
Oh, and this is the countdown script if you need to see it.
local Hint = Instance.new("Hint", workspace) Hint.Name = "Count" while wait() do if game.Players.NumPlayers < 2 then Hint.Archivable = true else Hint.Archivable = false for i = 9,0,-1 do for h = 59,0,-1 do Hint.Text = i..":"..h wait(1) end end end end
|
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
| |
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
| |
|
|
| 18 Sep 2011 08:14 PM |
What is "Count"?
-[::ƧѡÎḾḠΰῩ::]- -[::Maker of stuff and breaker of combos::]- |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 18 Sep 2011 08:16 PM |
| Look at my second post. That's the name of the hint. |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2011 08:18 PM |
Is there any output at all?
-[::ƧѡÎḾḠΰῩ::]- -[::Maker of stuff and breaker of combos::]- |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 18 Sep 2011 08:20 PM |
| It says runnign script but its not doing nothing. THe value doesn't go to 0 and there's no message when the hint is 0 |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2011 08:26 PM |
Ummmm.... Lemme think.... I think it's a logic error, which could be hard to fix.... Imma try something....
PS: I like ....'s
-[::ƧѡÎḾḠΰῩ::]- -[::Maker of stuff and breaker of combos::]- |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2011 08:29 PM |
Try this... This is the script that makes the hint, but I've added the section that creates the message INSIDE of this script. So right after the timer hits 0:0 it creates the message. Dunno if it will work, but it's worth a shot.
local Hint = Instance.new("Hint", workspace) Hint.Name = "Count" while wait() do if game.Players.NumPlayers < 2 then Hint.Archivable = true else Hint.Archivable = false for i = 9,0,-1 do for h = 59,0,-1 do Hint.Text = i..":"..h wait(1) end end local Message = Instance.new("Message", Workspace) for i,v in pairs(game.Players:GetPlayers()) do if v:findFirstChild("leaderstats") then if v.leaderstats["Magma Goals"].Value > v.leaderstats["Squirter Goals"].Value then Message.Text = "Team Magma Wins!" wait(2) Message:Remove() elseif v.leaderstats["Squirter Goals"].Value > v.leaderstats["Magma Goals"].Value then Message.Text = "Team Squirter Wins!" wait(2) Message:Remove() end end end end end
-[::ƧѡÎḾḠΰῩ::]- -[::Maker of stuff and breaker of combos::]-
|
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 18 Sep 2011 08:31 PM |
^that work?
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 18 Sep 2011 08:38 PM |
THANK YOU MAN!!!!!!
Now, if I added this would it work?
local Hint = Instance.new("Hint", workspace) Hint.Name = "Count" while wait() do if game.Players.NumPlayers < 2 then Hint.Archivable = true else Hint.Archivable = false for i = 1,0,-1 do for h = 59,0,-1 do Hint.Text = i..":"..h wait(1) end end local Message = Instance.new("Message", Workspace) for i,v in pairs(game.Players:GetPlayers()) do if v:findFirstChild("leaderstats") then if v.leaderstats["Magma Goals"].Value > v.leaderstats["Squirter Goals"].Value then Message.Text = "Team Magma Wins!" wait(2) Message:Remove() elseif v.leaderstats["Squirter Goals"].Value > v.leaderstats["Magma Goals"].Value then Message.Text = "Team Squirter Wins!" wait(2) Message:Remove() end end end end end--THis part wait(1) if game.Players.NumPlayers >=2 then for i,v in pairs(game.Players:GetPlayers()) do if v:findFirstChild("leaderstats") then v.leaderstats["Magma Goals"].Value = 0 v.leaderstats["Squirter Goals"].Value = 0 end end end
|
|
|
| Report Abuse |
|
|
|
| 18 Sep 2011 08:42 PM |
local Hint = Instance.new("Hint", workspace) Hint.Name = "Count" while wait() do if game.Players.NumPlayers < 2 then Hint.Archivable = true else Hint.Archivable = false for i = 1,0,-1 do for h = 59,0,-1 do Hint.Text = i..":"..h wait(1) end end local Message = Instance.new("Message", Workspace) for i,v in pairs(game.Players:GetPlayers()) do if v:findFirstChild("leaderstats") then if v.leaderstats["Magma Goals"].Value > v.leaderstats["Squirter Goals"].Value then Message.Text = "Team Magma Wins!" wait(2) Message:Remove() elseif v.leaderstats["Squirter Goals"].Value > v.leaderstats["Magma Goals"].Value then Message.Text = "Team Squirter Wins!" wait(2) Message:Remove() wait(1) for i,v in pairs(game.Players:GetPlayers()) do if v:findFirstChild("leaderstats") then v.leaderstats["Magma Goals"].Value = 0 v.leaderstats["Squirter Goals"].Value = 0 end end end end end end end
-[::ƧѡÎḾḠΰῩ::]- -[::Maker of stuff and breaker of combos::]- |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 18 Sep 2011 08:49 PM |
DUDE THANK YOU SO MUCH! Ima ask ozzy to give you that test!
Also, I get why it works :D |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2011 08:49 PM |
YAAAAAY I helped someone and they learned stoofz from it! WOOP WOOP
-[::ƧѡÎḾḠΰῩ::]- -[::Maker of stuff and breaker of combos::]- |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 18 Sep 2011 08:56 PM |
Trust me, I know how to get pay you back
Btw, you want to be a scripting helper 3, right? |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2011 08:58 PM |
Scripter Teir 3 would be ashum :3
-[::ƧѡÎḾḠΰῩ::]- -[::Maker of stuff and breaker of combos::]- |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
| |
|
|
| 18 Sep 2011 09:30 PM |
| Its Swimmguy777. That guy is really smart. He helped me with my script too. |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 18 Sep 2011 09:47 PM |
| No really? He just helped me :P |
|
|
| Report Abuse |
|
|