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

I am making a loading screen (From Alvin blox) but it's not working. How can I fix it?

What I am trying to do is that I'm making a loading screen script. But it's an error and it's not working what can be the problem?

Here's the code:

game.ReplicatedFirst:RemoveDefaultLoadingScreen()

local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui") PlayerGui:SetTopbarTransperency(0)

local GUI = script.LoadingScreen:Clone() GUI.Parent = PlayerGui

repeat wait(2) until game:IsLoaded()

GUI.Frame:TweenPosition(UDim2.new(0,0,1,0),"Game almost loaded","Game loaded",0.5) wait(1) GUI:Destroy()

This code was from Alvin Blox, so credits/shoutout to him!

If you find what's right, Thank you!

Sincerely,

Ducksneedhelp

2 comments

0

Is it a LocalScript in ReplicatedFirst?

0

Yes the local script is in ReplicatedFirst

3 answers

✓ Accepted answer

The script that Silents made is right but i think roblox made new HUD and there is no topbar in it so i assume they removed this command or what. Try to remove line 5

PlayerGui:SetTopbarTransperency(0)

and see if it works.

Nothing much to explain here, here is a fixed script.

game.ReplicatedFirst:RemoveDefaultLoadingScreen()

local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui") 

PlayerGui:SetTopbarTransparency(0)

local GUI = script.LoadingScreen:Clone()

GUI.Parent = PlayerGui

repeat wait(1) until game:IsLoaded() -- A wait of 2 seconds wasn't necessary, 1 is enough.

GUI.Frame:TweenPosition(UDim2.new(0,0,1,0),"InOut","Sine",0.5) 

wait(1) GUI:Destroy()

I mean there is good but when I try it again, there comes an error message saying

"SetTopbarTransperency is not a valid member of PlayerGui"

That comes up. What have I done wrong?

1 comment

0

Copy the script again, it works..

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