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: Why won't the content provider work properly?

Previous Thread :: Next Thread 
SectionOne is not online. SectionOne
Joined: 12 Mar 2010
Total Posts: 3783
23 Jun 2016 07:18 PM
CODE;

repeat wait()lui.Bar:TweenSize(UDim2.new((cp.RequestQueueSize/cpl),0,0,20),"InOut","Quad",.1)until cp.RequestQueueSize<1

So what I'm trying to do is make the bar go up all the way till the end, but it keeps spazing out. Can someone tell me off how big of an idiot I am and how could I fix this?


Report Abuse
filiptibell is not online. filiptibell
Joined: 10 Mar 2013
Total Posts: 2362
23 Jun 2016 07:19 PM
what is "cpl"?
Report Abuse
SectionOne is not online. SectionOne
Joined: 12 Mar 2010
Total Posts: 3783
23 Jun 2016 07:19 PM
oh cpl is this, this is used to make an actual queue for the place;

local cpl=cp.RequestQueueSize


Report Abuse
SectionOne is not online. SectionOne
Joined: 12 Mar 2010
Total Posts: 3783
23 Jun 2016 07:20 PM
So basically it seeks to find how much the assets are pending at the start of the game.


Report Abuse
Borsy is not online. Borsy
Joined: 31 Jul 2014
Total Posts: 15111
23 Jun 2016 07:21 PM
h='' repeat while true do Spawn(function() while true do print'help' h=h..'a' end end) end until false


Report Abuse
filiptibell is not online. filiptibell
Joined: 10 Mar 2013
Total Posts: 2362
23 Jun 2016 07:22 PM
the queue size might have increased after you set cpl to the current queue size

also, you should set the override argument of the tween to true, like this, so that the newest tween is always the one thats active:

TweenSize(size, "InOut", "Quad", .1, true)
Report Abuse
SectionOne is not online. SectionOne
Joined: 12 Mar 2010
Total Posts: 3783
23 Jun 2016 07:24 PM
So is there a way I could make it so if it increased, it will lower the bar instead of going over it?


Report Abuse
filiptibell is not online. filiptibell
Joined: 10 Mar 2013
Total Posts: 2362
23 Jun 2016 07:25 PM
yeah, something like:

local cpl = cp.RequestQueueSize
repeat
wait()
if cp.RequestQueueSize > cpl then cpl = cp.RequestQueueSize end
lui.Bar:TweenSize(UDim2.new((cp.RequestQueueSize/cpl),0,0,20),"InOut","Quad",.1)
until cp.RequestQueueSize < 1
Report Abuse
TheGrayHat is not online. TheGrayHat
Joined: 02 May 2014
Total Posts: 523
23 Jun 2016 07:34 PM
Is it intentional for cp.RequestQueueSize/cpl to be one on the first iteration then decrease to zero?
Report Abuse
War_Force is not online. War_Force
Joined: 15 Apr 2016
Total Posts: 2611
23 Jun 2016 07:37 PM
The lower the number is, the higher the bar goes, that's my intention. This is my main btw.


Report Abuse
War_Force is not online. War_Force
Joined: 15 Apr 2016
Total Posts: 2611
23 Jun 2016 07:38 PM
Basically I'm trying to do like something at plaza, where it shows loading asset screen.


Report Abuse
TheGrayHat is not online. TheGrayHat
Joined: 02 May 2014
Total Posts: 523
23 Jun 2016 07:42 PM
Then modifying the above code, it should be:

local cpl = cp.RequestQueueSize
repeat
wait()
if cp.RequestQueueSize > cpl then cpl = cp.RequestQueueSize end
lui.Bar:TweenSize(UDim2.new((1 - cp.RequestQueueSize/cpl),0,0,20),"InOut","Quad",.1)
until cp.RequestQueueSize < 1
Report Abuse
War_Force is not online. War_Force
Joined: 15 Apr 2016
Total Posts: 2611
23 Jun 2016 07:43 PM
Gray, you're a god. Thanks!


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