Hibobb
|
  |
| Joined: 18 Apr 2010 |
| Total Posts: 2146 |
|
|
| 06 Jun 2013 03:03 PM |
Why doesnt this work?
debounce = false
if debounce = false then wait(1) debounce = true wait() local c = game.Players.GetChildren() if #c =< 1 then -- change this after testing for i = 1, #c do if c[i].Character.TeamColor = "Bright Blue" then c[i].Character.Torso.CFrame = CFrame.new(-280, 393.2, 160.5) elseif c[i].Character.TeamColor = "Bright Red" then c[i].Character.Torso.CFrame = CFrame.new(-12, 393.2, -104.5) wait(180) c[i].Character.Torso.CFrame = CFrame.new(-189, 572.2, 18) end end end
wait(1)
debounce = false
end
Output: 16:04:45.872 - Workspace.Script:3: 'then' expected near '=' |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2013 03:03 PM |
debounce = false
if debounce == false then --Need to '=' signs. It means 'is equal to'. wait(1) debounce = true wait() local c = game.Players.GetChildren() if #c =< 1 then -- change this after testing for i = 1, #c do if c[i].Character.TeamColor = "Bright Blue" then c[i].Character.Torso.CFrame = CFrame.new(-280, 393.2, 160.5) elseif c[i].Character.TeamColor = "Bright Red" then c[i].Character.Torso.CFrame = CFrame.new(-12, 393.2, -104.5) wait(180) c[i].Character.Torso.CFrame = CFrame.new(-189, 572.2, 18) end end end
wait(1)
debounce = false
end |
|
|
| Report Abuse |
|
|
| |
|
Hibobb
|
  |
| Joined: 18 Apr 2010 |
| Total Posts: 2146 |
|
|
| 06 Jun 2013 03:05 PM |
Next error message:
16:08:18.948 - Workspace.Script:8: 'then' expected near '=' |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2013 03:05 PM |
debounce = false
if debounce == false then --Needs to '=' signs. wait(1) debounce = true wait() local c = game.Players:GetChildren() --This is a method, not a property or child. if #c <= 1 then -- change this after testing for i = 1, #c do if c[i].Character.TeamColor = "Bright blue" then c[i].Character.Torso.CFrame = CFrame.new(-280, 393.2, 160.5) elseif c[i].Character.TeamColor = "Bright red" then c[i].Character.Torso.CFrame = CFrame.new(-12, 393.2, -104.5) wait(180) c[i].Character.Torso.CFrame = CFrame.new(-189, 572.2, 18) end end end
wait(1)
debounce = false
end |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2013 03:06 PM |
| I fixed a LOT of simple errors in the one above. |
|
|
| Report Abuse |
|
|
Hibobb
|
  |
| Joined: 18 Apr 2010 |
| Total Posts: 2146 |
|
|
| 06 Jun 2013 03:08 PM |
| Thanks for seeing that but it wasnt creating the error |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2013 03:24 PM |
Oops, forgot to fix those.
debounce = false
if debounce == false then --Needs to '=' signs. wait(1) debounce = true wait() local c = game.Players:GetChildren() --This is a method, not a property or child. if #c <= 1 then -- change this after testing for i = 1, #c do if c[i].Character.TeamColor == "Bright blue" then c[i].Character.Torso.CFrame = CFrame.new(-280, 393.2, 160.5) elseif c[i].Character.TeamColor == "Bright red" then c[i].Character.Torso.CFrame = CFrame.new(-12, 393.2, -104.5) wait(180) c[i].Character.Torso.CFrame == CFrame.new(-189, 572.2, 18) end end end
wait(1)
debounce = false
end |
|
|
| Report Abuse |
|
|
Hibobb
|
  |
| Joined: 18 Apr 2010 |
| Total Posts: 2146 |
|
|
| 06 Jun 2013 03:41 PM |
This is my finished product. It still doesn't work but it does not show any messages in the output. Now whats the problem?
debounce = false
if debounce == false then wait() debounce = true wait() local c = game.Players:GetChildren() if #c <= 1 then -- change this after testing for i = 1, #c do if c[i].TeamColor == "Deep Blue" then c[i].Character.Torso.CFrame = CFrame.new(-280, 393.2, 160.5) elseif c[i].TeamColor == "Bright Red" then c[i].Character.Torso.CFrame = CFrame.new(-12, 393.2, -104.5) wait() c[i].Character.ForceField:Remove() wait(180) c[i].Character.Torso.CFrame = CFrame.new(-189, 572.2, 18) game.Lighting.ForceField:Clone().Parent = c[i].Character end end end
wait(1)
debounce = false
end
|
|
|
| Report Abuse |
|
|
Hibobb
|
  |
| Joined: 18 Apr 2010 |
| Total Posts: 2146 |
|
| |
|