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 » Scripters
Home Search
 

Re: Scripting question

Previous Thread :: Next Thread 
Retruvius is not online. Retruvius
Joined: 26 Aug 2010
Total Posts: 1493
21 Apr 2015 11:40 AM
How would I go about creating a script that moves a union 4 studs at a time until it goes 32 studs (eight visible movements), where it respawns where it began and does the same thing on a loop.

I would want each 4 stud movement to occur after .5 seconds.

Any ideas?
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
21 Apr 2015 11:52 AM
for i = 1,8 do
union.Position = union.Position + Vector3,new(0,0,4)
wait(0.5)
end
Report Abuse
Retruvius is not online. Retruvius
Joined: 26 Aug 2010
Total Posts: 1493
21 Apr 2015 11:57 AM
Thank you, and that will make it respawn where it was originally afterward?
Report Abuse
DevTheHunter432 is not online. DevTheHunter432
Joined: 23 Mar 2013
Total Posts: 275
21 Apr 2015 12:16 PM
Brick= script.Parent

while true do
for i = 1, 8 do
Brick.CFrame = Brick.CFrame + Vector3.new(4,0,0)
Wait(0.5)
end

if i == 8 then i = 1
end
Report Abuse
DevTheHunter432 is not online. DevTheHunter432
Joined: 23 Mar 2013
Total Posts: 275
21 Apr 2015 12:19 PM
Change the if to

if i == 8 then Brick.CFrame = Vector3.new(0,0,0)

Btw, the vector3 value can be wherever the position of the brick was when it started.
Report Abuse
Retruvius is not online. Retruvius
Joined: 26 Aug 2010
Total Posts: 1493
21 Apr 2015 12:55 PM
Thanks so much.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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