Very simple function not working for some reason

I’m making a function that plays a sound and plays another one after the first one ends when a proximity prompt is triggered, but it’s not working and I have no idea why.

Here’s the script:

local chase = game.SoundService.Chase

script.Parent.Triggered:Connect(function()
	
	print("beginning")
	chase.Beginning:Play()
	chase.Beginning:Play()
	wait(54.39)
	
	print("loop")
	chase.Loop.Playing = true
	chase.Loop.Looped = true
	
end)

None of the print() statements are being printed either.

What script are you using? Is it client-side or server-side? I’m pretty sure it will work if you use the server-side script.

local Chase = game.SoundService.Chase
local Beginning = Chase:WaitForChild("Beginning")
local Loop = Chase:WaitForChild("Loop")
local Prompt = script.Parent

if not Beginning.IsLoaded then
    print("Loading Beginning");
	Beginning.Loaded:Wait()
end
if not Loop.IsLoaded then
    print("Loading Loop");
	Loop.Loaded:Wait()
end

Prompt.Triggered:Connect(function(player: Player)
	print("beginning")
	Beginning:Play()
	task.wait(Beginning.Length)
	
	print("loop")
	Loop:Play()
end)

Make sure that the audios are loaded before they are played.

the first sound is playing but the second one isn’t. is it a problem with the amount of time it takes for the sound to load? it’s only about 13 seconds so im not sure why it would take long to load.

its a server side script. i think it’s and issue with the sounds not being loaded, but they aren’t long sounds so i’m not sure what’s taking them so long to load