Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why won't my Loading GUI duplicate?

Hello, I am trying to replace ROBLOX's loading screen with my loading screen. I am using a script I modified from the wiki to help me do this. The LocalScript is in the ReplicatedFirst service and the GUI is in the ReplicatedStorage service.

My problem is that my script will not transfer my loading screen to the player. I've used printing to see where the script stops, but it doesn't even print anything, nor do I get any errors in the output. What do I do?

LocalScript:

script.Parent:RemoveDefaultLoadingScreen()
print("Removed default load screen") --Doesn't even pass this.
 
local screen = game:GetService("ReplicatedStorage").PreloadGui:Clone()
print("Cloned GUI")
screen.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
 
local textLabel = screen.Back.Loading
print("Found text")
 
local count = 0

print("Starting while loop")
while game.ContentProvider.RequestQueueSize > 0 do
	textLabel.Text = "Loading "
	for i=1,count do
		textLabel.Text = textLabel.Text .. "."
	end	
	count = (count + 1) % 4
	wait(.3) 
end

print("While loop done, for loop begin") 
for i = 0,1,0.1 do
	screen.Back.ImageLabel.ImageTransparency = i
	screen.Back.Loading.TextTransparency = i
	wait(0.1)
end
print("Complete, setting values.")
game.Players.LocalPlayer:WaitForChild("LoadedGame").Value = true
screen.Parent = nil

Any help is appreciated, thanks!

1 comment

0

Funny, these random down voters, voting down a good question.

1 answer

✓ Accepted answer

Currently, This feature is only available on GameTest1. According to the Wiki, instead of

script.Parent:RemoveDefaultLoadingScreen()

You should use

game.ReplicatedFirst:RemoveDefaultLoadingScreen()

4 comments

0

Darn, this would've been a nice feature to have right now... Thanks anyway.

0

Gui also has to be in replicatedFirst

0

Okay, thanks. I'll try that tomorrow.

0

Well, I think I can come to a conclusion that ReplicatedFirst doesn't work right now. Tried multiple LocalScripts in it but to no avail.

This discussion is preserved as it was. New answers, comments, and votes are closed.