Hello, i have made a loading gui in my game that, once the game fully loads, dissapears, however, if something fails to load, the gui stops working even if the game fully loads Here is my code:
local frame = script.Parent.Frame local base = frame.Base local bar = base.Bar local indicator = base.Indicator local skip = base.Skip local queue = game.ContentProvider.RequestQueueSize game:GetService("RunService").Stepped:Connect(function() indicator.Text = "Loading Assets... (" .. queue .. ")" bar.Size = UDim2.new(1/queue, 0, 1, 0) if queue == 0 then indicator.Text = "Assets Loaded!" bar.Size = UDim2.new(1, 0, 1, 0) wait(1) frame:TweenPosition(UDim2.new(0, 0, 1, 0)) end end)
can anyone help me here???
When using parentheses, you need to make it a long string. Here:
local frame = script.Parent.Frame local base = frame.Base local bar = base.Bar local indicator = base.Indicator local skip = base.Skip local queue = game.ContentProvider.RequestQueueSize game:GetService("RunService").Stepped:Connect(function() indicator.Text = [[Loading Assets... (]] .. queue .. [[)]] bar.Size = UDim2.new(1/queue, 0, 1, 0) if queue == 0 then indicator.Text = "Assets Loaded!" bar.Size = UDim2.new(1, 0, 1, 0) wait(1) frame:TweenPosition(UDim2.new(0, 0, 1, 0)) end end)