Basically, I'm making a round based PVP game, and i'm trying to make it so when the game starts, the music changes , and in the server script, (where it plays the music) it will fire a remote event to the client, but im getting an error: FireClient() argument must be a player object. Help would be appreciated.
Here is the 1st script: (server script)
local player = game.Players.LocalPlayer
--I skipped to the part where it plays the music
game.ReplicatedStorage.startMusic:FireClient()
2nd script: (Local script)
game.ReplicatedStorage.startMusic.OnClientEvent:Connect(function()
game.Workspace.Music.Lobby:Stop()
game.Workspace.Music.Game1:Play()
end

6 comments
It's not working, I'm still getting this error: 14:13:17.327 FireClient: player argument must be a Player object, Script 'ServerScriptService.MainScript'
Oops! I completely forgot that this was written on the server. I've updated my answer.
Thanks for the help, I'll just do it for the server as that is easier.
The reason I'm trying to do this is because i made a menu screen and it plays the lobby music when the player is on the menu, which also plays music.
That makes sense. Good luck with your game!
Thanks!