I have 2 scripts that could be causing this (Code will be at the end.) The first script is the one that creates the leaderboard. The second script is the one that saves the players' data. It is most likely the PlayerEntered or PlayerAdded functions causing this. (I am bad at both.) Any help would be appreciated, thanks!
Roblox account: Happyhal75
First script (Leaderboard)
game.Players.PlayerAdded:connect(function(p) local stats = Instance.new("IntValue") stats.Name = "leaderstats" stats.Parent = p local money = Instance.new("IntValue") money.Name = "Obby Wins" -- Change "Money" to anything you want to name it like "Cash" money.Parent = stats end)
Second script: (Saver)
local datastore = game:GetService("DataStoreService") local ds1 = datastore:GetDataStore("GemSaveSystem") game.Players.PlayerAdded:connect(function(plr) local folder = Instance.new("Folder", plr) folder.Name = "leaderstats" local gems = Instance.new("IntValue", folder) gems.Name = "Obby Wins" gems.Value = ds1:GetAsync(plr.UserId) or 0 ds1:SetAsync(plr.UserId, gems.Value) gems.Changed:connect(function() ds1:SetAsync(plr.UserId, gems.Value) end) end)
Well, I don't see any problem with the two scripts. Although maybe cailir is right? You must check if you have any malicious scripts, that is if you did use any free models.