When the button is clicked, it fires a remote event called which plays a song. The script works in studio mode, but in server mode nothing happens when the button is clicked. Does anyone know why?
This script is inside the text button ~
local GUI = script.Parent.Parent
local button = GUI:WaitForChild("Caroline")
button.MouseButton1Click:connect(function()
GUI.Sound.SoundId = "rbxassetid://441341990"
game.ReplicatedStorage.Song:FireServer()
end)
This script is placed in ServerScriptService
game.ReplicatedStorage.Song.OnServerEvent:connect(function(player)
game.Workspace.SongBoard.MainWall.SurfaceGui.ScrollingFrame.Sound:Play()
end)
Both scripts are server-side scripts the and place is Filtering Enabled, by the way.
Thanks

3 comments
From what I can see you change the sound id on the local script, this change will not replicate to the server. You then play the sound on the server.
Both scripts being server-side completely eliminates the purpose of FE and the use of the remote event. Not to mention, remotes must have a connection with both machines (client and server), rather than just one. I suggest you watch this video on remote events: https://www.youtube.com/watch?v=4Dc_bri9mjs
I changed the text button script to local but it wouldn't play in either studio or server mode