i tried to make a progress bar with this script: -- Variables. local frame = script.Parent.Frame local bar = frame.Bar local inside = bar.Inside
local player = game.Players.LocalPlayer
-- Functions. local function ResizeBar(percent) inside:TweenSize(UDim2.new(percent/100, 0, 1, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 1, true) wait(1) end
-- Start loading. game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
frame.Visible = true
-- Resize to 10%. ResizeBar(10)
-- Wait for the character to load. repeat wait() until player.Character ~= nil ResizeBar(40)
-- Load in assets. game:GetService("ContentProvider"):PreloadAsync({workspace, player.PlayerGui}) ResizeBar(100)
-- Hide screen. frame.TextLabel.Text = "LOADED!" wait(1)
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, true) script.Parent:Destroy()
Bar = progress bar. Inside = the progress OF the bar. frame = the screen itself.