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 » Scripting Helpers
Home Search
 

Re: Something wrong with the Wait function

Previous Thread :: Next Thread 
Boopbot is not online. Boopbot
Joined: 11 Jul 2008
Total Posts: 2284
26 May 2012 12:58 PM
If I put 0.05 as the wait function for an object, it only plays at 0.5. This only happens in some wait functions and not in others. Is there an error in the one-lined code or is Roblox getting messed up again?
Report Abuse
Boopbot is not online. Boopbot
Joined: 11 Jul 2008
Total Posts: 2284
27 May 2012 10:16 AM
Bump
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
27 May 2012 10:17 AM
print(wait(0.05))
Report Abuse
Boopbot is not online. Boopbot
Joined: 11 Jul 2008
Total Posts: 2284
27 May 2012 10:20 AM
Output : 0.39187900811191 342.09868075086

Does this mean that wait(0.05) actually happens at 0.392 seconds?
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
27 May 2012 10:23 AM
Unless your running the computers the have at the ROBLOX offices;
the timing is always a bit off.

Not uncommon.

print(wait())
0.048498271340577

We know it should he 0.003 (1 Frame).

Usually it won't affect anything.
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
27 May 2012 10:24 AM
*be
Report Abuse
Boopbot is not online. Boopbot
Joined: 11 Jul 2008
Total Posts: 2284
27 May 2012 10:24 AM
So how do I "fix" it.
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
27 May 2012 10:27 AM
Studio can bug out for days;
even when you know its correct.

Just try the regular routine
(Close studio, Delete the script, ect).

Sometimes continuing fixes the problem for me
(sometimes meaning twice).
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
27 May 2012 10:29 AM
I'm having the exact same problem;
I know its not my fault.

My code just won't run properly.
Report Abuse
Boopbot is not online. Boopbot
Joined: 11 Jul 2008
Total Posts: 2284
27 May 2012 10:30 AM
Ok, so it should fix itself on its own? I've tried all the other fixes.
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
27 May 2012 10:32 AM
Loops, threads, ect.

If you have too many;
that MAY be restricting the amount of power ROBLOX wants to use for your code.
Report Abuse
Boopbot is not online. Boopbot
Joined: 11 Jul 2008
Total Posts: 2284
27 May 2012 10:33 AM
I just recently used the script scheduler to reduce the amount of CPU Roblox spends on scripts.
Report Abuse
Boopbot is not online. Boopbot
Joined: 11 Jul 2008
Total Posts: 2284
27 May 2012 10:35 AM
Wait, I found a way to fix it. In the Roblox Settings, under Lua, change the WaitingThreadsBudget from 0.1 to 1. This might not be the best solution, but it works for now.
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
27 May 2012 10:36 AM
I just checked mine too;
0.5% with all the prints. :L
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
27 May 2012 10:37 AM
Do you think there is any possible way it might be the code?
Though I have major doubt in that.
Report Abuse
Boopbot is not online. Boopbot
Joined: 11 Jul 2008
Total Posts: 2284
27 May 2012 10:37 AM
No, it's only a simple function, and it works in other games.
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
27 May 2012 10:39 AM
Then I have no idea;
but I think I found my problem...

Just re-code some of it.
Report Abuse
Boopbot is not online. Boopbot
Joined: 11 Jul 2008
Total Posts: 2284
27 May 2012 10:40 AM
Now in Play mode it speeds up some loops but some are still going slow.
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
27 May 2012 10:41 AM
What were you working in before?

Maybe this was a waste of time? :o
Report Abuse
Boopbot is not online. Boopbot
Joined: 11 Jul 2008
Total Posts: 2284
27 May 2012 10:42 AM
I was in Build mode and everything was slow. I changed the WaitingThreadBudget and it worked fine in Build mode. In play mode though only some of the wait loops worked.
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
27 May 2012 10:44 AM
Test it in play mode if all else fails.
Report Abuse
Boopbot is not online. Boopbot
Joined: 11 Jul 2008
Total Posts: 2284
27 May 2012 10:45 AM
I already tested it, that's how I knew that some of the scripts worked or not.
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
27 May 2012 10:46 AM
Hopefully it will all work out.

I am still stuck;
now I think its my code...
Report Abuse
Boopbot is not online. Boopbot
Joined: 11 Jul 2008
Total Posts: 2284
27 May 2012 11:18 AM
Local scripts fix the gui animations, but I still can't get onject animations. Can you put a localscript in those and make it work?
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
27 May 2012 03:43 PM
Try it.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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