|
| 08 Oct 2012 07:44 PM |
I need help with this script I made. (This is not a free model but someone else helped me make it.) script.Parent.Touched:connect(function(hit) script.Parent.Parent.FlagPiece.BrickColor = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent).TeamColor local thing = workspace.Flag1.Timer for i = 1, 1800 do for _,v in pairs (thing:GetChildren()) do v.Name = i end wait(1) end end)
There is no output. Everything but line 6 works fine I think. Please fix it so that it works and I can finally use it. (If you want the actual flag, here it is:http://www.roblox.com/Broken-flag-item?id=94438793) |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 08 Oct 2012 08:48 PM |
script.Parent.Touched:connect(function(hit) pcall(function() script.Parent.Parent.FlagPiece.BrickColor = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent).TeamColor end) local thing = workspace.Flag1.Timer for i = 1, 1800 do for _,v in pairs (thing:GetChildren()) do v.Name = tostring(i) end wait(1) end end)
|
|
|
| Report Abuse |
|
|
|
| 09 Oct 2012 02:34 PM |
How do I keep it from freaking out and making another timer start while ones going? Like: it's at 5 and you press it again so then it goes to 1 and then 6 and then 2 and so on? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
| 10 Oct 2012 02:40 PM |
| I need the help here peoplze!! |
|
|
| Report Abuse |
|
|
mazer246
|
  |
| Joined: 13 Sep 2007 |
| Total Posts: 412 |
|
|
| 10 Oct 2012 02:42 PM |
| http://wiki.roblox.com/index.php/Debounce |
|
|
| Report Abuse |
|
|
|
| 10 Oct 2012 02:45 PM |
Could you add that in? would it be if Debounce = false then |
|
|
| Report Abuse |
|
|
| |
|
Jlobblet
|
  |
| Joined: 05 Sep 2010 |
| Total Posts: 587 |
|
|
| 10 Oct 2012 04:11 PM |
if debounce == false then --code elseif debounce == true then return end
~if not ok then return end |
|
|
| Report Abuse |
|
|
Jlobblet
|
  |
| Joined: 05 Sep 2010 |
| Total Posts: 587 |
|
|
| 10 Oct 2012 04:12 PM |
As a very rough note. I use:
ok = true
function check() if not ok then return end--stops it going if ok == false ok = false--stops it repeating --code ok = true--allows it to continue end
notice it contains my signature.
~if not ok then return end
|
|
|
| Report Abuse |
|
|
|
| 10 Oct 2012 07:47 PM |
But if I use debounce I can''t make it so another player on another team capture it.
Here is exactly what I want it to do: Make it so the same team can't capture it if they own it. Make it so if another team captures it then the timer will reset to 1. How would I do that? |
|
|
| Report Abuse |
|
|