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
 

Position.

Previous Thread :: Next Thread 
LbpPlayer34 is not online. LbpPlayer34
Joined: 08 Jul 2012
Total Posts: 523
16 Aug 2013 10:33 PM
Ok, so everyone knows about, Rotation, TimeOfDay, Position. Right? Well say theres this

Position = Vector3.new(0, 0, 0)
And then, I want to move it one by one.
like so
Position = Vector3.new(0, 1, 0)
wait()
Position = Vector3.new(0, 2, 0)

And on, and on, and on.

How can I make that shorter so I can do like

while true do
p= Position = Vector3.new(0, +1, 0)
wait()
p
wait()
p
wait()



Is it possible?
Report Abuse
hunte922 is not online. hunte922
Joined: 28 May 2008
Total Posts: 6969
16 Aug 2013 10:37 PM
num = 0
while true do
num = num + 1
p = Vector3.new(0,num,0)
wait(0.1)
end
Report Abuse
MikeAnIkes is not online. MikeAnIkes
Joined: 13 Mar 2010
Total Posts: 1581
16 Aug 2013 10:40 PM
It's very possible, and one of the fundamental things to learn if you want to start making real code:

timesToMove = 3 -- Change, of course
part = Workspace.Part
for i = 1,timesToMove do -- Start a for loop that will iterate (happen) `timesToMove` times
part.Position = part.Position + Vector3.new(0,1,0)
wait()
end

~ Oh, I'm sorry, did I break your concentration? ~
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