Hello!
I'm trying to make a music player script FE compatible, so the script is supposed to change the ID everytime the last song ends and also show the song's name and I've figured these things out.
But the last things what I need help with is to make the script work so the songs are playing for everyone SYNCED. So... When someone joins the game/server, the new player hears it like the others so it doesn't start the ENTIRE playlist over for the new player.
I'm pretty sure that it needs RemoteFunctions or RemoteEvents, but here's the scripts...!:
MAIN SCRIPT WHERE ALL THE SONGS ARE:
local NP = game.StarterGui.MenuGUI.MenuFRAME.MusicFRAME.NowPlaying.Text
local MP = game.ServerStorage.MusicPlayer.SoundId
game.ReplicatedStorage.MusicRE.OnServerEvent:Connect(function()
NP = "Tsunami Hardstyle"
MP = "rbxassetid://142720946"
MP.Play()
MP.Ended:Wait()
print("If you see this on the OUTPUT, the script should be working.")
end)
THE REMOTE-EVENT TRIGGER:
game.Players.PlayerAdded:Connect(function(player)
game.ReplicatedStorage.MusicRE:FireServer()
end)
Hopefully someone can help, thank you for reading! :)
