RemoteEvent Argument always returning nil?

I’ve had this issue since I made this code. The RemoteEvent is simply just returning nil on the client after I sent an argument.

Code:

events["Ambiance"]:FireAllClients("On") -- game.ReplicatedStorage.RemoteEvents.Ambiance:FireAllClients("On"), btw, On is the argument.


local ambEvent = events["Ambiance"]

ambEvent.OnClientEvent:Connect(function(Player,Type)
	ambEvent:FireServer(Type) -- Returns nil (if you do print(Type))
end)

Remove the Player parameter.

FireAllClients(), FireClient() doesn’t pass a player instance unless you explicitly instruct it to.

1 Like