hi i made two scripts that save data using datastore but they appear on leaderboard which i dont want. i cant fix it either because i used a plugin to add scripts and i dont even understand anything about it
anyways here are the scripts
datastore:
local datastore = game:GetService("DataStoreService"):GetDataStore("leaderstats")
game.Players.PlayerAdded:Connect(function(plr)
wait()
local plrkey = "id_"..plr.userId
local savevalue = plr.leaderstats.Cash
local GetSaved = datastore:GetAsync(plrkey)
if GetSaved then
savevalue.Value = GetSaved[1]
else
local NumbersForSaving = {savevalue.Value}
datastore:GetAsync(plrkey, NumbersForSaving)
end
end)
game.Players.PlayerRemoving:Connect(function(plr)
datastore:SetAsync("id_"..plr.userId, {plr.leaderstats.Cash.Value})
end)
leaderstats:
game.Players.PlayerAdded:Connect(function(plr)
local leaderstats = Instance.new("Folder", plr)
leaderstats.Name = "leaderstats"
local Cash = Instance.new("IntValue", leaderstats) - variable
Cash.Name = "Cash" -- Name
Cash.Value = 100 -- Initial Value
if true then
end
end)
how to remove it from leaderboard