generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Humanoid walking loop script isnt working

Previous Thread :: Next Thread 
testdummy5000 is not online. testdummy5000
Joined: 04 Jun 2010
Total Posts: 818
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
Seizurezxzz is not online. Seizurezxzz
Joined: 12 Feb 2013
Total Posts: 1297
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
testdummy5000 is not online. testdummy5000
Joined: 04 Jun 2010
Total Posts: 818
22 Aug 2014 06:14 PM
why G_?
Report Abuse
testdummy5000 is not online. testdummy5000
Joined: 04 Jun 2010
Total Posts: 818
22 Aug 2014 06:27 PM
_G*
Report Abuse
Seizurezxzz is not online. Seizurezxzz
Joined: 12 Feb 2013
Total Posts: 1297
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
testdummy5000 is not online. testdummy5000
Joined: 04 Jun 2010
Total Posts: 818
22 Aug 2014 07:37 PM
Mk.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image