Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 02 Sep 2013 12:25 AM |
if isonteam(plr, teams[raider]) then cap=Instance.new("IntValue", plr) cap.Name = "Cap" for i = 1,10 do if plr:FindFirstChild("Cap") and not cap then cap = true gui.Frame.Capturing.Progress.Text = raider.. " is capturing the terminal from " ..currentowner.. " at " ..tostring(i).. "0%" wait(for10) else gui.Frame.Capturing.Progress.Text = "Nobody is currently capturing the terminal" break end return end cap = false currentowner = raider counting = true updatecolor() updateowner() gui.Timer.Visible = true for i = counttime, 1, -1 do if counting then local seconds = i%60 < 10 and "0" .. tostring(i%60) or tostring(i%60) gui.Timer.Time.Text = tostring(math.floor(i/60)) .. ":" .. seconds else gui.Timer.Visible = false break end wait(1) end win() end It works, but it just skips for i = 1,10 Please help ask questions if needed touchended event removes capture from player cap is a variable |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
| |
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 02 Sep 2013 12:51 AM |
Bumpty Dumpty sat on a wall Bumpy Dumpty took a fall All the forum mods and horses came to see ,and granted his wish, to make this thread alive again o _________o_ <-- on the wall | | | |
___________ | | o | | o <-- took a fall
_______________________________ }Bumpty Dumps Thread | <-- forum later that day }attempt to index a 'nil value'| }ima nub | }500R$ script | }y dis no work | }omg help plz | }what is script and lau? | _______________________________ |
|
|
| Report Abuse |
|
|
| |
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 02 Sep 2013 12:53 AM |
^lol i got tons of terminals request before nur, this one is my most latest one.. |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 02 Sep 2013 12:54 AM |
Bumpty Dumpty sat on a wall Bumpy Dumpty took a fall All the forum mods and horses came to see ,and granted his wish, to make this thread alive again o _________o_ <-- on the wall | | | |
___________ | | o | | o <-- took a fall
_______________________________ }Bumpty Dumps Thread | <-- forum later that day }attempt to index a 'nil value'| }ima nub | }500R$ script | }y dis no work | }omg help plz | }what is script and lau? | _______________________________ {If You Have Forum Enchancer Toggle Markdown to see what it really looks like} |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
| |
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 02 Sep 2013 01:01 AM |
Bumpty Dumpty sat on a wall Bumpy Dumpty took a fall All the forum mods and horses came to see ,and granted his wish, to make this thread alive again o __o <-- on the wall | | | | | | o | | o <-- took a fall }Bumpty Dumps Thread | <-- forum later that day }attempt to index a 'nil value'| }ima nub | }500R$ script | }y dis no work | }omg help plz | }what is script and lau? | {If You Have Forum Enchancer Toggle Markdown to see what it really looks like} |
|
|
| Report Abuse |
|
|
|
| 02 Sep 2013 01:05 AM |
You made some syntax errors. Idk wut tho, but I notice errors. |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
| |
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 02 Sep 2013 10:22 AM |
Bumpty Dumpty sat on a wall Bumpy Dumpty took a fall All the forum mods and horses came to see ,and granted his wish, to make this thread alive again o _________o_ <-- on the wall | | | |
___________ | | o | | o <-- took a fall
_______________________________ }Bumpty Dumps Thread | <-- forum later that day }attempt to index a 'nil value'| }ima nub | }500R$ script | }y dis no work | }omg help plz | }what is script and lau? | _______________________________ {If You Have Forum Enchancer Toggle Markdown to see what it really looks like} |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 02 Sep 2013 10:26 AM |
Bumpty Dumpty sat on a wall Bumpy Dumpty took a fall All the forum mods and horses came to see ,and granted his wish, to make this thread alive again |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
| |
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
| |
|
|
| 02 Sep 2013 10:51 AM |
You instance something with cap and right afterwards, you check if it's false ("not cap") it's not going to be false w/o some interference so the first condition will never be fulfilled. That's the first problem.
The second problem was that you put a return for the for loop which would just make the script end there if this wasn't in a function. |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 02 Sep 2013 10:55 AM |
^ theres a variable for cap so it cant double capture. |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 02 Sep 2013 10:57 AM |
| Can you atleast help me fix it? |
|
|
| Report Abuse |
|
|
|
| 02 Sep 2013 11:03 AM |
I'm helping you by telling you what you've done wrong.
cap=Instance.new("IntValue", plr)--Gave cap a value so it's now true cap.Name = "Cap" for i = 1,10 do if plr:FindFirstChild("Cap") and not cap then--checks if caps false, I don't see where it could turn false because cap = false is outside of the for loop. |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 02 Sep 2013 11:04 AM |
How would i fix it... the whole terminal works. The for i = 1,10 its like it doesnt even run. |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
| |
|
|
| 02 Sep 2013 11:08 AM |
else gui.Frame.Capturing.Progress.Text = "Nobody is currently capturing the terminal" break end return end "break end" breaks the loop |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 02 Sep 2013 11:11 AM |
I know. I added return end so it returns the function to a end after the break |
|
|
| Report Abuse |
|
|
|
| 02 Sep 2013 11:15 AM |
| That would only let the for loop loop once. |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 02 Sep 2013 11:18 AM |
Can you fix it? Not just tell me |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
| |
|