It's pretty simple and I decided to just add Tweening but I get a Userdata error on line 8 of my script. I'd love a well detailed answer

Here's the script:

script.Parent:RemoveDefaultLoadingScreen()
 
local LoadingScreen = game.ReplicatedFirst.ScreenGui:Clone()
LoadingScreen.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
 

while game.ContentProvider.RequestQueueSize > 0  do
	LoadingScreen.Frame:TweenPosition(UDim2.new(0,0, -8,0) "Out", "Linear", 2, true)
	LoadingScreen.Frame:TweenPosition(UDim2.new(0,0, 8,0) "Out", "Linear", 2, false)
	
end

script.LoadingScreen:remove()

My ScreenGui is inside of ReplicatedFirst along with the LocalScript. There's no scripts inside of the ScreenGui! Also in the tutorial I saw a percentage sign "%" and wondered what this does, so if this can also be answered, Thanks.

This is the Wiki's script:

script.Parent:RemoveDefaultLoadingScreen()
 
local screen = Instance.new("ScreenGui")
screen.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
 
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

2 comments

0

There's no % here. Can you include that part that you're asking about?

0

@BlueTaslem , I'll add the script that's given in the Roblox Wiki (Includes at %)