Loading Screen not WORKING

  1. What do you want to achieve? Keep it simple and clear!
    I have a loading screen here and I want it to work for low end PC in a high end game

  2. What is the issue? Include screenshots / videos if possible!
    I used it in a High End game particuraly a massive airport that has good graphics although I have a bad pc and I was wondering why would the script now work but it works for my friend that has a good gaming pc

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I cannot find any solutions.

local TweenService = game:GetService("TweenService")
local player = game.Players.LocalPlayer


game.Workspace:FindFirstChild("Loading").Playing = true
script.Parent.Enabled = true

game:GetService("ContentProvider"):PreloadAsync(game:GetDescendants())

local function onClose(ui)


	wait(1)

	local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
	local properties = {
		BackgroundTransparency = 1,
	}

	local tween = TweenService:Create(ui, tweenInfo, properties)
	tween:Play()
end

local function onClose2(ui)


	wait(1)

	local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
	local properties = {
		ImageTransparency = 1,
	}

	local tween = TweenService:Create(ui, tweenInfo, properties)
	tween:Play()
end

local function onClose3(ui)


	wait(1)

	local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
	local properties = {
		TextTransparency = 1,
	}

	local tween = TweenService:Create(ui, tweenInfo, properties)
	tween:Play()
end

local function go()
	onClose(script.Parent.Main.Frame)
	onClose(script.Parent.Main.Frame["Loading Bar"])
	onClose3(script.Parent.Main.TextLabel)
	onClose2(script.Parent.Main.Picture)
	onClose2(script.Parent.Main.Logo)
	onClose(script.Parent.Main)
end

wait(1)

	print("player loaded")
	script.Parent.Main.Frame["Loading Bar"]:TweenSize(UDim2.new(1.055, 0,1.146, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 10)
wait(10)
go()
game.Workspace:FindFirstChild("Loading").Playing = false
1 Like

I also tried this in my baseplate game in which it worked very well.

Do you have a line of code elsewhere that removes the default Roblox loading screen?
game:GetService("ReplicatedFirst"):RemoveDefaultLoadingScreen()

-

This will not improve loading time - the intended use of PreloadAsync is to prioritise certain items that need to be loaded quickly, preloading everything in the workspace has no effect on loading time (see below post)

I would recommend removing this line from your code:

game:GetService("ContentProvider"):PreloadAsync(game:GetDescendants())

as Roblox already does that for you.

Also, turn this FindFirstChild into a WaitForChild

game.Workspace:FindFirstChild("Loading").Playing = true

The PreloadAsync method used for yielding code until game assets are loaded within ContentProvider service.

Baseplate is just a basic template that has nothing but only one part at the workspace. Attempting to use PreloadAsync on baseplate will decrease time for yielding the code.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.