I added the Instance.new("ImageLabel") in the script with the discriptions, but it didn't show them up. This is the script:
script.Parent:RemoveDefaultLoadingScreen() local screen = Instance.new("ScreenGui") screen.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") local imageLabel = Instance.new("ImageLabel") imageLabel.Size = UDim2.new(1,0,1,0) imageLabel.Image = "http://www.roblox.com/asset/?id=(NUMBER)" --Image Asset ID Number local textLabel = Instance.new("TextLabel") textLabel.Parent = screen textLabel.Text = "Loading" textLabel.Size = UDim2.new(1,0,1,0) textLabel.FontSize = Enum.FontSize.Size14 local count = 0 while game.ContentProvider.RequestQueueSize > 0 do textLabel.Text = "Loading " .. string.rep(".",count) count = (count + 1) % 4 wait(.3) end screen.Parent = nil
Like what M39a9am3R said, the problem is that you don't have a parent for imageLabel
.
Usually, when you don't set a parent, the object actually has a parent; and that parent is nil
. If the parent is nil, you can still set the parent to anything like Workspace
to Lighting
, but only if it's a variable.
script.Parent:RemoveDefaultLoadingScreen() local screen = Instance.new("ScreenGui") screen.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") local imageLabel = Instance.new("ImageLabel") imageLabel.Parent = screen imageLabel.Size = UDim2.new(1,0,1,0) imageLabel.Image = "http://www.roblox.com/asset/?id=(NUMBER)" --Image Asset ID Number local textLabel = Instance.new("TextLabel") textLabel.Parent = screen textLabel.Text = "Loading" textLabel.Size = UDim2.new(1,0,1,0) textLabel.FontSize = Enum.FontSize.Size14 local count = 0 while game.ContentProvider.RequestQueueSize > 0 do textLabel.Text = "Loading " .. string.rep(".",count) count = (count + 1) % 4 wait(.3) end screen.Parent = nil