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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| Joined: 26 Aug 2010 |
| Total Posts: 1493 |
|
| |
|