the first parameter of an OnServerEvent connection will always be the player who fired that RemoteEvent
so, if you sent the server "foo" and "bar" on the client, the server would get the player who fired the event, "foo", and "bar"
local RemoteEvent = path.to.RemoteEvent
RemoteEvent:FireServer("foo", "bar")
local RemoteEvent = path.to.RemoteEvent
RemoteEvent.OnServerEvent:Connect(function(arg1, arg2, arg3)
print(arg1, arg2, arg3)
end)
to fix your problem all you have to do is add a player parameter
wait(2)
local Sound = workspace.Sound
script.Parent.OnServerEvent:Connect(function(player, id)
Sound.SoundId = "http://www.roblox.com/asset/?id="..id
end)
1 comment
I also tired rbxassetid://.