Hello, I have made this script which changes the soundId to a certain sound then plays it but for some reason it doens't play? This is a server script btw.
game.ReplicatedStorage.Functions.SoundChange.OnServerEvent:Connect(function(plr, id)
local radio = game.Workspace.FE.Radio[plr.Name].Radio.Sound
radio.SoundId = "rbxassetid://"..id
repeat wait(1) until radio.SoundId ~= nil
wait(1)
radio:Play()
end)

4 comments
maybe the sound is deleted or something
Nah it's there because I can play it manually, just the script won't play it. Is there a different way to check if the sound has loaded maybe?
whats the hiearchy
your repeat loop is just going to break your script if you give the SoundId a nil value.