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: For loops

Previous Thread :: Next Thread 
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
15 Apr 2015 04:03 PM
tabley = {game.Workspace.part1,game.Workspace.part2,game.Workspace.part3}

for i, v in pairs(game.Workspace.m1:GetChlidren()) do
for ii, vv in pairs(tabley) do
vv.Position = v.Position
wait(1)
end
end

How would I make this run (almost) simultaneously?

This code is written just now and i'm doing this for educational purposes.
Report Abuse
PlaceRebuilder is not online. PlaceRebuilder
Joined: 29 Apr 2008
Total Posts: 1056
15 Apr 2015 04:05 PM
Hard to see what ur trying to do but my guess is
for i, v in pairs(game.Workspace.m1:GetChlidren()) do
for ii, vv in pairs(tabley) do
vv.Position = v.Positionx
end
wait(1)
end
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
15 Apr 2015 04:06 PM
I would consider myself to group the parts, get the model CFrame and then move it to a specific position but that's not what I really want.
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
15 Apr 2015 04:07 PM
soz i got late post :/
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
15 Apr 2015 04:09 PM
ew. don't double up the variables..just make new ones..The wait isnt necessary...

t = {game.Workspace.Part1,game.Workspace.Part2,game.Workspace.Part3}

for i, v in pairs(game.Workspace.M1:GetChildren()) do
for i, x in pairs(t) do
x.Position = v.Position
end
end
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
15 Apr 2015 04:16 PM
@PlaceRebuilder

It was something that I wanted to expect. Thanks for your help.

@TimeTicks

I needed the wait for something important. Thanks doe. :P
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