Loading Screen PLay Music

So I have made a loading screen and I am trying to make it play music until it is done loading, im new to making loading screens, can someone help? This is my code for the loading screen;

game.ReplicatedFirst:RemoveDefaultLoadingScreen()
local PlayerGui = game.Players.LocalPlayer:WaitForChild(“PlayerGui”)
llocal loadgui = script.Load:Clone()
lloadgui.Parent = PlayerGui

lif not game:IsLoaded() then
game.Loaded:Wait()
end

local player = game.Players.LocalPlayer
repeat wait() until player.Character

loadgui:Destroy()

1 Like

I don’t think this will work if you remove the loading screen.

What? I never said im removing the loading screen.

game.ReplicatedFirst:RemoveDefaultLoadingScreen()

Hmmmm…

game.ReplicatedFirst:RemoveDefaultLoadingScreen()

local player = game.Players.LocalPlayer
local PlayerGui = player:WaitForChild(“PlayerGui”)

local song = Instance.new("Sound")
song.SoundId = "rbxassetid://urid"
song.Parent = script

local loadgui = script.Load:Clone()
loadgui.Parent = PlayerGui

if not game:IsLoaded() then
    song:Play()
    game.Loaded:Wait()
end

if not player.Character then
    player.CharacterAdded:Wait()
end

loadgui:Destroy()
song:Destroy()

How about that?

HI! I already figured it out, thanks though!