How to make a loading bar screen in studio lite

Поділитися
Вставка
  • Опубліковано 16 січ 2025

КОМЕНТАРІ • 6

  • @Nooblite-1
    @Nooblite-1 23 дні тому

    Yo thanks!

  • @Gojo_playz10
    @Gojo_playz10 21 день тому

    Wait how you got studio in mobile

  • @RealBaconLite
    @RealBaconLite  23 дні тому +1

    guys i lost my other script so here is another one -- LocalScript inside StarterPlayer -> StarterPlayerScripts
    -- Create the ScreenGui
    local screenGui = Instance.new("ScreenGui")
    screenGui.Name = "LoadingScreen"
    screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
    -- Create a background frame (darkened overlay)
    local background = Instance.new("Frame")
    background.Name = "Background"
    background.Size = UDim2.new(1, 0, 1, 0)
    background.Position = UDim2.new(0, 0, 0, 0)
    background.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
    background.BackgroundTransparency = 0.6
    background.Parent = screenGui
    -- Create the loading bar background frame
    local loadingBarBg = Instance.new("Frame")
    loadingBarBg.Name = "LoadingBarBg"
    loadingBarBg.Size = UDim2.new(0.5, 0, 0.05, 0) -- 50% width, 5% height
    loadingBarBg.Position = UDim2.new(0.25, 0, 0.45, 0)
    loadingBarBg.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
    loadingBarBg.Parent = background
    -- Create the actual loading bar
    local loadingBar = Instance.new("Frame")
    loadingBar.Name = "LoadingBar"
    loadingBar.Size = UDim2.new(0, 0, 1, 0) -- starts with width of 0
    loadingBar.BackgroundColor3 = Color3.fromRGB(0, 255, 0) -- green color
    loadingBar.Parent = loadingBarBg
    -- Function to simulate loading
    local function simulateLoading()
    -- Gradually increase the size of the loading bar
    for i = 0, 100, 1 do
    wait(0.05) -- wait for a short time
    loadingBar.Size = UDim2.new(i / 100, 0, 1, 0) -- increase the width based on the percentage
    end
    -- After loading is complete, hide the loading screen
    screenGui:Destroy() -- removes the loading screen from the player's view
    end
    -- Call the simulateLoading function
    simulateLoading()

  • @changingmyytcauseitscringe
    @changingmyytcauseitscringe 23 дні тому +1

    Where's script?