Loading Screen not loading some services

Hi!
For some reason, My custom loading screen stopped working when I added new services. What’s going on?


It would always load 12/12 before and now all the sudden I add more an it goes crazy.

script.Parent.Parent.Enabled = true
local plrname = game.Players.LocalPlayer.Name
local Assets = {
	game:GetService("Workspace"),
	game:GetService("Players"),
	game:GetService("NetworkClient"),
	game:GetService("ReplicatedFirst"),
	game:GetService("ReplicatedStorage"),
	game:GetService("ServerStorage"),
	game:GetService("StarterPack"),
	game:GetService("StarterPlayer"),
	game:GetService("Teams"),
	game:GetService("SoundService"),
	game:GetService("Chat"),
	game:GetService("LocalizationService"),
	game:GetService("VRService"),
	game:GetService("AppUpdateService"),
	game:GetService("AssetService"),
	game:GetService("BadgeService"),
	game:GetService("CoreGui"),
	game:GetService("DataStoreService"),
	game:GetService("GamePassService"),
	game:GetService("StudioData"),
	game:GetService("HttpService"),
	game:GetService("UserInputService"),
	game:GetService("UserGameSettings"),
	game:GetService("TweenService"),
	game:GetService("PhysicsService"),
} 
print (#Assets.."need to be loaded!")
local text = script.Parent.Frame.Frame.TextLabel
local barImg = script.Parent.Frame.Frame.ImageLabel
local ContentProvider = game:GetService("ContentProvider")

for i = 1, #Assets do
	wait (.1)
	local Asset = Assets[i]

	text.Text = "Configuring "..Asset.Name.." [".. i .. " / "..#Assets.."]"
	print ("Loading asset: "..Asset.Name.."!")
	ContentProvider:PreloadAsync({Asset})

	local Progress = i / #Assets
	barImg:TweenSize(UDim2.new(Progress, 0, 1, 0), Enum.EasingDirection.In, Enum.EasingStyle.Sine, 1, false)
	print "tweened progress bar, more than buggy"
	wait(0.1)
	
end
text.Text = "Finishing.. []"
wait(0.1)
print "game loaded"
print "fixing the bar if it was bugged"
for i = 1,5 do 
	barImg:TweenSize(UDim2.new(1, 0, 1, 0), Enum.EasingDirection.In, Enum.EasingStyle.Sine, 1, false)
end
print "tweened"
wait(1)
for i = 1,100 do
	wait (0.01)
	print "making background transparent"
script.Parent.Frame.BackgroundTransparency += 0.01
script.Parent.Frame.Frame.BackgroundTransparency += 0.01
script.Parent.Frame.Frame.ImageLabel.ImageTransparency += 0.01
	script.Parent.Frame.Frame.TextLabel.TextTransparency += 0.01
end
print "done"
wait (3)
print "tweening logo, size"
script.Parent.Frame.logo:TweenSize(UDim2.new(0.533, 0, 0.751, 0), "Out", "Linear", 3, true) -- {0.533, 0},{0.751, 0}
print "tweening logo, moving"
script.Parent.Frame.logo:TweenPosition(UDim2.new(0.25, 0, 0.16, 0), "Out", "Linear", 2, true)-- {0.25, 0},{0.16, 0}1
wait (3)
for i = 1, 100 do
	wait (0.01)
	print "making text not transparent"
	script.Parent.TextLabel.BackgroundTransparency -= 0.01
	script.Parent.TextLabel.Text = "Welcome to 0b,"..plrname
	script.Parent.TextLabel.TextTransparency -= 0.01
	
end
wait (5)
print "making loading bye bye"
for i = 1,15 do
	wait (0.01)
	print "tweening.."
	script.Parent:TweenPosition(UDim2.new(1, 0, 0, 0), "Out", "Linear", 1, true)-- {0.25, 0},{0.16, 0}1
end
wait (3)
print "if the game is 10b >, display beta message"
warn ("Beta is nil! Displaying message.")
local BM = script.Parent.Parent.WSAsstes.Beta
if BM.Visible == false then
	print ("Message not visible!")
	BM.Visible = true
	print ("Set to visible for tweening")
else
	print ("I'm not stupid and the message IS visible!")
end
print ("Found BetaWarning in folder WSAssets!")
for i = 1, 15 do
	wait (0.01)
	print ("Beta returned nil, tweening")
	BM:TweenPosition(UDim2.new(0.282, 0, 0.312, 0), "Out", "Linear", 1, true) -- {0.282, 0},{0.312, 0}
end

Thanks!

1 Like

Maybe because the services you added are some type of services that doesn’t work like the services we use in general? E.g. StudioData, or UserGameService, or CoreGui, or AppUpdateService.
Edit: AFAIK you should not use (in your script) the services that are not shown by default in Studio’s explorer.

2 Likes