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: Loop a bricks movement

Previous Thread :: Next Thread 
jacob24068 is not online. jacob24068
Joined: 04 Apr 2011
Total Posts: 646
07 Dec 2013 01:13 PM
I am having troubles with making a brick moving and moving.
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
07 Dec 2013 01:19 PM
How do you want it to move?
Report Abuse
jacob24068 is not online. jacob24068
Joined: 04 Apr 2011
Total Posts: 646
07 Dec 2013 02:06 PM
Position. Sorry, building.
Report Abuse
KiwiMeister is not online. KiwiMeister
Joined: 18 Feb 2010
Total Posts: 1464
07 Dec 2013 02:11 PM
CFrame.new()
Report Abuse
KiwiMeister is not online. KiwiMeister
Joined: 18 Feb 2010
Total Posts: 1464
07 Dec 2013 02:13 PM
Heres an example of a brick moving up and down. Made it for a water script.

part = script.Parent
a = 0
while true do
a = 0
repeat
a = a + 1
part.CFrame = CFrame.new(part.Position + Vector3.new(0,.1,0))

wait()

until a == 50

wait()
a = 0
repeat
a = a + 1
part.CFrame = CFrame.new(part.Position - Vector3.new(0,.1,0))

wait()

until a == 50
wait(1)
end
Report Abuse
ilikehandy123 is not online. ilikehandy123
Joined: 19 Sep 2012
Total Posts: 67
07 Dec 2013 02:55 PM
Well, this is how to make a brick constantly move x+

while true do
part.Position = Vector3.new(part.Position.X+1,part.Position.Y,part.Position.Z)
end

Also, please note that this would make the brick start at the CURRENT position, and continuously go x+. Also, part would obviously be the brick.
Report Abuse
KiwiMeister is not online. KiwiMeister
Joined: 18 Feb 2010
Total Posts: 1464
07 Dec 2013 03:00 PM
remember to add wait()
Report Abuse
ilikehandy123 is not online. ilikehandy123
Joined: 19 Sep 2012
Total Posts: 67
07 Dec 2013 03:00 PM
Oh, yeah. xD Remember a wait. :P
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