So,in my game, I have made all my currency changes via local scripts because they mostly have to deal with changing GUIs. But I want them to be visible server side also. Is there any script that can make these changes visible to the leaderboard? Because I need to make the code inside local scripts, again. Using Remote events would mean that the game game is flooded with remote events. I am clueless, please help me!
Example local script I made: (inside a GUI)
local player = game.Players.LocalPlayer
local MediterraneanAvenue = game.ReplicatedStorage:WaitForChild("MediterraneanAvenue")
script.Parent.MouseButton1Click:Connect(function()
if player.leaderstats.Cash.Value >= 60 then
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value - 60
script.Parent.Parent.Parent.YesCash.Visible = true
wait(1)
script.Parent.Parent.Parent.YesCash.Visible = false
game.ReplicatedStorage.DestroyMediterranean:FireServer()
MediterraneanAvenue.Parent = game.Players.LocalPlayer.Backpack
elseif player.leaderstats.Cash.Value < 60 then
script.Parent.Parent.Parent.NoCash.Visible = true
wait(3)
script.Parent.Parent.Parent.NoCash.Visible = false
end
end)

3 comments
you NEED to use remote events, there is no other way except server scripts
if your game will be flooded with remote events, how is that a bad thing?
and besides, you need to put them in ReplicatedStorage anyways