smurf279
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 6871 |
|
|
| 30 Apr 2012 07:37 PM |
So i have a maze and every few minutes i have the maze "transform" into a new maze by generating a new maze inside of tables and tweening each part to the position of any random part in the new maze. I split the amount of parts moving at one time into 5 different groups(about 80-100 parts each) so the game doesn't get to laggy. What i don't get is how i am able to run the script in studio&play solo with a drop of around 1-2 fps and then go into my actual game and have the script get so laggy that the overall transformation looks like trash(parts just freeze in place and appear in a new position a few seconds later; other special effects get glitchy/don't happen; ect) and you can't even take out a tool without it randomly dissapearing from your inventory once you try using it. Can someone please explain to me how this works and any *possible* solutions(other than reducing number of each group)? |
|
|
| Report Abuse |
|
|
Quenty
|
  |
| Joined: 03 Sep 2009 |
| Total Posts: 9316 |
|
|
| 30 Apr 2012 10:27 PM |
Looks quite cool. I like it. I was in a server with like 4 people... and yeah, looked nice.
I would suggest using wait(0.06) or something in the tweening. And, before you tween add..
wait(math.random(1, 600) / 10 - TAKE OUT THIS, ROBLOX THINKS IT'S A PH #!; SHOULD BE 1K - 00)) |
|
|
| Report Abuse |
|
|
smurf279
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 6871 |
|
|
| 30 Apr 2012 11:10 PM |
Thanks i still want to add more finishing touches and all but at least i know its actually good so far Anyways I think I already have a wait(.125) for the tweening process and I don't want it to go too slow either but you're saying to add a wait(math.random(1, 600) / 10) inside the script or no? I didn't really get the comment and I don't see what its supposed to do |
|
|
| Report Abuse |
|
|
Quenty
|
  |
| Joined: 03 Sep 2009 |
| Total Posts: 9316 |
|
|
| 30 Apr 2012 11:17 PM |
In each loop, you want to space out the tweening. So, you add...
delay(0, (math.random(1, 60) / 100), function() -- Tween Stuff end) |
|
|
| Report Abuse |
|
|
smurf279
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 6871 |
|
| |
|