Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why won't this code work in a Local script and why won't it work when I test it in roblox?

Asked by 5 years ago

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.

0
SetCore() and SetCoreGuiEnabled() work only when the script is located in StarterGui. DeceptiveCaster 3761 — 5y
0
I've removed the Setcore code thing and the script is still not working. Luke2323244 17 — 5y
0
What does your script look like after you removed it? DeceptiveCaster 3761 — 5y

Answer this question