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: wait()/GUI lag?

Previous Thread :: Next Thread 
Negativize is not online. Negativize
Joined: 02 May 2011
Total Posts: 25068
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 is not online. 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
Negativize is not online. Negativize
Joined: 02 May 2011
Total Posts: 25068
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 is not online. 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
Negativize is not online. Negativize
Joined: 02 May 2011
Total Posts: 25068
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 is not online. 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
Negativize is not online. Negativize
Joined: 02 May 2011
Total Posts: 25068
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
LateralLace is not online. LateralLace
Joined: 19 Sep 2015
Total Posts: 662
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
LateralLace is not online. LateralLace
Joined: 19 Sep 2015
Total Posts: 662
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
LateralLace is not online. LateralLace
Joined: 19 Sep 2015
Total Posts: 662
20 Jun 2016 04:38 PM
eh?
Report Abuse
Negativize is not online. Negativize
Joined: 02 May 2011
Total Posts: 25068
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
0supadude0 is not online. 0supadude0
Joined: 11 Aug 2010
Total Posts: 649
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
0supadude0 is not online. 0supadude0
Joined: 11 Aug 2010
Total Posts: 649
20 Jun 2016 04:40 PM
All good then
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