|
| 20 Jun 2016 04:01 PM |
| So I have a few GUIs spawning with wait(0.025). The GUIs should be spaced out evenly, but some are closer to each other and some are farther from each other, although there's no random delays. What causes this? |
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 20 Jun 2016 04:02 PM |
run this:
while true do print(wait(0.025)) end
it's not always perfect because of lag but that shouldn't affect it a noticeable amount. It may be that you are creating too many gui objects and it is lagging the server or something. |
|
|
| Report Abuse |
|
|
|
| 20 Jun 2016 04:04 PM |
'it's not always perfect because of lag but that shouldn't affect it a noticeable amount. It may be that you are creating too many gui objects and it is lagging the server or something.'
iirc ScreenGUIs don't lag the game much. I'm only spawning 20-ish. |
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 20 Jun 2016 04:05 PM |
| I'd say that would probably be the source of your problem unfortunately :/ |
|
|
| Report Abuse |
|
|
|
| 20 Jun 2016 04:05 PM |
'I'd say that would probably be the source of your problem unfortunately :/'
Bummer, but iirc that shouldn't really happen with such a low amount of GUIs |
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 20 Jun 2016 04:08 PM |
| You're expecting 20 instances to be created sans lag, it's unimportant what type they are. |
|
|
| Report Abuse |
|
|
|
| 20 Jun 2016 04:08 PM |
'You're expecting 20 instances to be created sans lag, it's unimportant what type they are.'
Nah I meant that GUIs don't create much lag as I'm seeing but I get it |
|
|
| Report Abuse |
|
|
|
| 20 Jun 2016 04:29 PM |
You could always synchronize it to wait a certain amount of time based on real time.
wait(.0333/wait()) |
|
|
| Report Abuse |
|
|
|
| 20 Jun 2016 04:31 PM |
Woops made an error. Here's my revision:
t = 1 --amount of sec. realtime = wait() wait(.0333/realtime*(t-realtime)) |
|
|
| Report Abuse |
|
|
| |
|
|
| 20 Jun 2016 04:38 PM |
| Instead of creating multiple parts, I just created them all at once with fixed positions THEN moved them. Thanks for the help however <3 |
|
|
| Report Abuse |
|
|
|
| 20 Jun 2016 04:39 PM |
Post code
It shouldn't create a noticeable amount of lag, but if it does and this affects the positioning of your interfaces, you should be doing it a different way |
|
|
| Report Abuse |
|
|
| |
|