If i have two functions with the same name but different parameters taken that get called OnServerEvent, will this work?
game.ReplicatedStorage.addToFishCountEvent.OnServerEvent:Connect(function(player, fishName) end) game.ReplicatedStorage.addToFishCountEvent.OnServerEvent:Connect(function(player, fishName, Quantity) --this one has Quantity as a parameter end)
Can you overload like this?
Thank you for any help.
I recommend using different RemoteEvents (assuming you are using them), by just naming them differently they will work the same but without messing anything up. (The server events cna be connected to the same thing, just do the FireServer()
twice but defining the different RemoteEvent names. (Unless you're trying to overload them, that is!)
game.ReplicatedStorage.addToFishCountFirstEvent.OnServerEvent:connect(function(player) end) game.ReplicatedStorage.addToFishCountSecondEvent.OnServerEvent:connect(function(player) end)