#Loading screen Script
51 messages · Page 1 of 1 (latest)
click on this dot
yes and ??
its a break point you need to remove it your script execution stops after reaching it
Right click on the red dot and click remove brake point or somthing like that
It was not activated, just my mouse hovering over it
good ?
local replicatedFirst = game:GetService("ReplicatedFirst")
local contentProvider = game:GetService("ContentProvider")
local tweenService = game:GetService("TweenService")
local players = game:GetService("Players")
local player = players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGUI")
local loadingScreen = script:WaitForChild("LoadingScreen")
replicatedFirst:RemoveDefaultLoadingScreen()
local assets = game:GetDescendants()
local clonedLoadingScreen = loadingScreen:Clone()
clonedLoadingScreen.Parent = playerGui
for i = 1, #assets do
local asset = assets[i]
local percentage = math.round(i / #assets * 100)
contentProvider:PreloadAsync({asset})
clonedLoadingScreen.Background.DisplayPourcentage.Text = percentage.."%"
clonedLoadingScreen.Background.DisplayAssetsLoaded.Text = "Loading Assets: "..i.."/"..#assets
if i % 5 == 0 then
task.wait()
end
if i == #assets then
task.wait(1)
end
end
yep ty
I changed this line of code and the screen is displayed:
local playerGui = player:WaitForChild("PlayerGUI")
but the screen does not load...
yea
PlayerGui
gimme a second
no PlayerGUI
wait
local replicatedFirst = game:GetService("ReplicatedFirst")
local contentProvider = game:GetService("ContentProvider")
local tweenService = game:GetService("TweenService")
local players = game:GetService("Players")
local loadingScreen = script.Parent
replicatedFirst:RemoveDefaultLoadingScreen()
local assets = game:GetDescendants()
for i = 1, #assets do
local asset = assets[i]
local percentage = math.round(i / #assets * 100)
contentProvider:PreloadAsync({asset})
loadingScreen.TextLabel2.Text = percentage.."%"
loadingScreen.TextLabel.Text = "Loading Assets: "..i.."/"..#assets
if i % 5 == 0 then
task.wait()
end
if i == #assets then
task.wait(1)
end
end
Modify this code that it fits for you the cloning was completly unneccessery btw
@slim flax
I must be cursed, when I put your script it doesn't work either... nothing is displayed anymore
** You are now Level 2! **
thats because I have script.Parent as my loadingScreen you obviously need to change it 😭
wait
** You are now Level 2! **
do
local replicatedFirst = game:GetService("ReplicatedFirst")
local contentProvider = game:GetService("ContentProvider")
local tweenService = game:GetService("TweenService")
local players = game:GetService("Players")
local loadingScreen = script.Parent --Change this
replicatedFirst:RemoveDefaultLoadingScreen()
local assets = game:GetDescendants()
for i = 1, #assets do
local asset = assets[i]
local percentage = math.round(i / #assets * 100)
contentProvider:PreloadAsync({asset})
loadingScreen.TextLabel2.Text = percentage.."%" --Change This
loadingScreen.TextLabel.Text = "Loading Assets: "..i.."/"..#assets --Change This
if i % 5 == 0 then
task.wait()
end
if i == #assets then
task.wait(1)
end
end
who to do color nub ?
local textButton = script.Parent
local Main = script.Parent.Parent.Parent.Main
local informationsFrame = script.Parent.Parent.Parent.Main.Informations
local function onClick()
for _, frame in pairs(Main:GetChildren()) do
if frame:IsA("Frame") then
frame.Visible = false
end
end
informationsFrame.Visible = true
end
textButton.MouseButton1Click:Connect(onClick)
???
could you open a new thread for your problem please
#1020374354867007528
local loadingScreen = script.Parent
Do I have to put a WaitForChild for this line? I understand more
no cause my script is in my screengui and how is the script supposed to load wehn its parent isnt loaded yet
I'm sorry but it still doesn't show up..
also thats the worst way to use content provider service. i can optimise it
cool have fun helping him im tired asf
i dont wanna
im terrible at explaining
then dont come here and tell him u can optimize his script if u dont wnat