I have a remote event that fires a number to the server, and then the server adds that value to a single players leaderstat value.
It only adds the value to one player, yet it duplicates for each player in the game. For example, I have it set to send 5 to the Server, but then the server adds 10 if there are two players, 15 if there are three players, etc.
Why would this be occuring? Please help!
On the client, it looks like this
game.ReplicatedStorage.CurrencyChange:FireServer(5)
On the server, it looks like this
game.Players.PlayerAdded:Connect(function(player)
game.ReplicatedStorage.CurrencyChange.OnServerEvent:Connect(function(player, amount)
player.leaderstats.Points.Value = player.leaderstats.Points.Value + amount
end)
end)