-
What do you want to achieve?
so i want to make a custom loading screen with percentage that loaded . -
What is the issue?
i have the percentage already but i dont know how to shorten it .
--//Remove default loading bar
script.Parent:RemoveDefaultLoadingScreen()
--//New UI
local loadingScreen = script.ScreenGui
loadingScreen.Parent = game.Players.LocalPlayer.PlayerGui
local loadingBlur = script.LoadingBlur
loadingBlur.Parent = game.Lighting
--//Loading
local contenProvider = game:GetService("ContentProvider")
game.Loaded:Wait()
local toLoad = game:GetDescendants()
local total = #toLoad
for i,v in pairs(toLoad) do
loadingScreen.Background.Counter.Text = "DOWNLOADED: "..i.." / ".."TOTAL: "..total
loadingScreen.Background.BarBG.Bar.Size = UDim2.new(i/total, 0, 1, 0)
contenProvider:PreloadAsync({v})
print(i/total)
end
--//Finished loading
wait(1)
loadingBlur:Destroy()
loadingScreen:Destroy()
here is a picture of the percentage im talking about .
im planning to remove the front and the back so it will be 99.91% .So how do i do that ??