I've got this code in a local script which is in a TextLabel and everytime I test it won't work.

local workspaceassets = game.Workspace:GetChildren()

local replcatedastorageassets = game.ReplicatedStorage:GetChildren()

local serverscriptserviceassets = game.ServerScriptService:GetChildren()

local startguiassets = game.StarterGui:GetChildren()

game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)

local numberofassets = #workspaceassets + #replcatedastorageassets + #serverscriptserviceassets + #startguiassets

while wait() do

for x = numberofassets,0,-1 do

wait(0.5)

script.Parent.Text = "Loading Assets: "..x

end

script.Parent.Text = "Loaded!"

wait(1)

script.Parent.Visible = false

game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true)

script.Parent.Parent.Parent:Destroy()

end

Here what it looks like.

I hope someone can help.

3 comments

0

SetCore() and SetCoreGuiEnabled() work only when the script is located in StarterGui.

0

I've removed the Setcore code thing and the script is still not working.

0

What does your script look like after you removed it?