RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a cool loading screen what lasts for 20 seconds and player can not move while its loading"
-- local script (StarterGUI) local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local screenGui = Instance.new("ScreenGui", player.PlayerGui) local loadingFrame = Instance.new("Frame", screenGui) loadingFrame.Size = UDim2.new(1, 0, 1, 0) loadingFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0) local loadingText = Instance.new("TextLabel", loadingFrame) loadingText.Size = UDim2.new(1, 0, 1, 0) loadingText.Text = "Loading..." loadingText.TextColor3 = Color3.fromRGB(255, 255, 255) loadingText.BackgroundTransparency = 1 loadingText.Font = Enum.Font.SourceSans loadingText.TextScaled = true humanoid.WalkSpeed = 0 local function loadingScreen() for i = 1, 20 do loadingText.Text = "Loading... " .. tostring(i * 5) .. "%" wait(1) end loadingFrame:Destroy() humanoid.WalkSpeed = 16 end spawn(loadingScreen)