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
 

How would I... -- Axis Scripting

Previous Thread :: Next Thread 
YellowlolXlol is not online. YellowlolXlol
Joined: 20 Dec 2009
Total Posts: 48
27 Mar 2014 12:55 PM
How would I move a brick up and down (vertically) every 'x' amount of seconds?

Thank you.
Report Abuse
LoveableGirlXD is not online. LoveableGirlXD
Joined: 18 Feb 2014
Total Posts: 429
27 Mar 2014 01:08 PM
brick = game.Workspace.namehere

function movebrick
wait(0.5)
brick.vector3.new = "Position here"
wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"wait(0.5)
brick.vector3.new = "Position here"
Report Abuse
Aesthetical is online. Aesthetical
Joined: 01 Jan 2014
Total Posts: 2141
27 Mar 2014 02:16 PM
@above

Damn man, do you even for loop?
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
27 Mar 2014 02:23 PM
@love
The only part correct there is
brick =
And
wait(0.5)

Brick = Workspace.PartName
Height = 5--how many studs up,can only be a solid number,or Number.SolidNumber
--so like 3.1 or 3.5 will work,but 3.14567 wont
while wait() do
Pos = 0
OrigPos = Pos
repeat
wait()
Brick.CFrame = Brick.CFrame+Vector3.new(0,0.1,0)
Pos = Pos+0.1
until Pos == Height
repeat
wait()
Brick.CFrame = Brick.CFrame -Vector3.new(0,0.1,0)
Pos = Pos-0.1
until Pos == OrigPos
wait()
end
Report Abuse
Kingmouli is not online. Kingmouli
Joined: 28 Sep 2012
Total Posts: 1292
27 Mar 2014 02:23 PM
Before for loop you should learn how to change the Position

@OP while true do
wait(1)
script.Parent.Position = script.Parent.Position + Vector3.new(0, math.random(-5,5), 0)

I don't know if math.random takes negative number but try it.
Report Abuse
Kingmouli is not online. Kingmouli
Joined: 28 Sep 2012
Total Posts: 1292
27 Mar 2014 02:24 PM
Add an end
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
27 Mar 2014 02:27 PM
Did ANYONE see my BEAUTIFUL script??
Report Abuse
Kingmouli is not online. Kingmouli
Joined: 28 Sep 2012
Total Posts: 1292
27 Mar 2014 02:32 PM
Yeah I saw it. It's -fabulous-
jk (I'm not saying it's bad)
Report Abuse
YellowlolXlol is not online. YellowlolXlol
Joined: 20 Dec 2009
Total Posts: 48
30 Mar 2014 02:16 PM
Thanks, guys..
Report Abuse
Kingmouli is not online. Kingmouli
Joined: 28 Sep 2012
Total Posts: 1292
31 Mar 2014 12:14 PM
Did mine work?
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