Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does the Frames size go bigger than 1?

Asked by 8 years ago

So im making a loading screen and i want to make a loading bar. But the X Size goes crazy and either is too small or too big. Why is this?

-- Part of the code im having problems with

local contprovider = game:GetService("ContentProvider")
local TotalNeeded = contprovider.RequestQueueSize
local CurrentGui = script.Parent:WaitForChild("LoadingBar"):WaitForChild("CurrentPlace") 

while contprovider.RequestQueueSize > 0 do
    wait()
    CurrentGui.Size = UDim2.new((math.abs(contprovider.RequestQueueSize - TotalNeeded)/TotalNeeded),0,1,0)
    print(CurrentGui.Size)
end

Answer this question