|
| 11 Jun 2015 06:53 PM |
local players = game.Players:GetPlayers()
while true do wait() if game.Workspace.Ball.Position.X == 27 and for i=1, #players do if players[i].TeamColor==BrickColor.new("Black") then if players[i].Character.Torso.Position.X>27 then print("Hi") end end end end end
Output: 17:53:30.424 - Workspace.Script:7: unexpected symbol near 'for' |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2015 06:55 PM |
"and"
This has no place in this script. |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2015 06:55 PM |
| After the if statement after wait() you put and instead of then. |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2015 06:56 PM |
Yes.
Its suppose to run if the ball x position is 27 AND black team players have greater value then 27 it prints Hi |
|
|
| Report Abuse |
|
|
| |
|
seliso
|
  |
| Joined: 30 Jan 2011 |
| Total Posts: 6443 |
|
|
| 11 Jun 2015 06:59 PM |
while true do wait() if game.Workspace.Ball.Position.X == 27 then for i=1, #players do if players[i].TeamColor==BrickColor.new("Black") then if players[i].Character.Torso.Position.X>27 then print("Hi") end end end end end |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2015 07:00 PM |
| I said you put "and" instead of "then" |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2015 08:56 PM |
It doesn't make the daily value turn offsides
local players = game.Players:GetPlayers()
while true do wait() if game.Workspace.Ball.Position.X == 27 then for i=1, #players do if players[i].TeamColor==BrickColor.new("Black") then if players[i].Character.Torso.Position.X>27 then game.Workspace.display.Value = "Offsides" end end end end end
Output: 19:55:01.772 - httpGet http://ecsv2.roblox.com/studio/e.png?sessionID=41264af8-5f0c-480f-bc66-24d1e537ba95&userID=32973097&placeID=95206881&event=Action&action=simulationPlayAction&label=none&value=0 failed. Trying again. Error: HTTP 400 (HTTP/1.1 400 Target and EventType parameters are required). Elapsed time: 0.161702 19:55:09.097 - httpGet http://ecsv2.roblox.com/studio/e.png?sessionID=41264af8-5f0c-480f-bc66-24d1e537ba95&userID=32973097&placeID=95206881&event=Action&action=viewOutputWindowAction&label=none&value=0 failed. Trying again. Error: HTTP 400 (HTTP/1.1 400 Target and EventType parameters are required). Elapsed time: 0.14095 19:55:09.116 - httpGet http://ecsv2.roblox.com/studio/e.png?sessionID=41264af8-5f0c-480f-bc66-24d1e537ba95&userID=32973097&placeID=95206881&event=Action&action=viewOutputWindowAction&label=none&value=0 failed. Trying again. Error: HTTP 400 (HTTP/1.1 400 Target and EventType parameters are required). Elapsed time: 0.137843 |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2015 09:10 PM |
You see the logic in this script is saying that...if x and if ...you can't have two if statement's in 1 if-block, because "then" is not there
if game.Workspace.Ball.Position.X == 27 -- first if' statement and -- and statement, continues if-block for i=1, #players do -- um... for's can be used a contrast statement? if players[i].TeamColor==BrickColor.new("Black") then -- 2nd' if statement, missing first then if players[i].Character.Torso.Position.X>27 then print("Hi") end end end end end
|
|
|
| Report Abuse |
|
|
|
| 11 Jun 2015 09:21 PM |
local players = game.Players:GetPlayers()
while true do wait() for i=1, #players do if players[i].TeamColor==BrickColor.new("Black") and players[i].Character.Torso.Position.X>27 and game.Workspace.Ball.Position.X == 27 then game.Workspace.display.Value = "Offsides" end end end
still get the same error |
|
|
| Report Abuse |
|
|