So.
To begin, I want to say, that I have a Localscript and a saving leaderstats Script. I can't modify leaderstats with localscript, because they aren't saving. In order to save, I need to modify them with a server script. But! There is a huge problem.
I can't modify player leaderstats through Script (if you know a way, leave an answer asap!)
and
I can modify leaderstats through LocalScript, but they won't save, because the "Changed" event for leaderstats isn't registering when LocalScript is modifying values.
`` I tried to explain as best, as I could, please respond if you know!
Although sending your script would be nice, I'll do my best.
GLOBAL (Server/Normal Script):
local statsChanged = game.ReplicatedStorage.statsChanged -- This assumes you have a "RemoteEvent" called "statsChanged" in ReplicatedStorage statsChanged.OnServerEvent:connect(function(plr,points) local leaderstats = plr.leaderstats local savepoints = leaderstats:FindFirstChild("points") savepoints.Value = points end)
LOCALSCRIPT:
local points = pointstoaddidk local statsChanged = fgame.ReplicatedStorage.statsChanged -- I'll assume "points" will be a "NumberValue" points.Changed:connect(function() statsChanged:FireServer(points) end)
This situation doesn't look to unstable, so if you could send a script to base my scripts off of, that'd be grand.
Or actually do something similar to what LawlR said in your comments: GLOBAL (Server/Normal Script):
local players = game.Players for i,plr in pairs(players:GetChildren()) plr.leaderstats.Money.Value = plr.leaderstats.Money.Value + 5 end
The simple script above will add "5" to all players' money.