|
| 22 Aug 2014 05:45 PM |
So I'm making a script or a robot to walk to one position and back for an infinite loop. Here is the script.
local x = 1
while x == 1 do game.Workspace.Robot.Humanoid:MoveTo(Vector3.new(0,0,25)) wait(1) game.Workspace.Robot.Humanoid:MoveTo(Vector3.new(0,0,0)) end
When I run the game, the robot walks 25 studs forward, then it stops. It doesn't go to and fro like the way I want it to. Please help. Thank you. :)
~Time keeps moving on and on and on, soon we'll all be gone. - Blink 182, Man Overboard~ |
|
|
| Report Abuse |
|
|
|
| 22 Aug 2014 06:10 PM |
_G.x = 1
while _G.x == 1 do game.Workspace.Robot.Humanoid:MoveTo(Vector3.new(0,0,25)) wait(8) game.Workspace.Robot.Humanoid:MoveTo(Vector3.new(0,0,0)) wait(8) end |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 22 Aug 2014 07:03 PM |
| Eh, I like using _G because it makes a client wide variable, unlike local whitch would make the Variable chunk wide. |
|
|
| Report Abuse |
|
|
| |
|