. What is the issue? For some reason my global leaderboard script always shows this error. Does anyone know what’s wrong here?
Error “103: double is not allowed in data stores.”
local ds = game:GetService("DataStoreService")
local coinsODS = ds:GetOrderedDataStore("eS3")
local timeUntilReset = 5
local Short = require(game.ReplicatedStorage:WaitForChild("Short"))
while wait(1) do
timeUntilReset = timeUntilReset - 1
if timeUntilReset == 0 then
timeUntilReset = 60
for i, plr in pairs(game.Players:GetPlayers()) do
coinsODS:SetAsync(plr.UserId, plr.leaderstats["Total Clicks"].Value) --- error here
end
for i, leaderboardRank in pairs(script.Parent:GetChildren()) do
if leaderboardRank.ClassName == "Frame" then
leaderboardRank:Destroy()
end
end
local success, errorMsg = pcall(function()
local data = coinsODS:GetSortedAsync(false, 100)
local coinsPage = data:GetCurrentPage()
for rankInLB, dataStored in ipairs(coinsPage) do
local name = game.Players:GetNameFromUserIdAsync(tonumber(dataStored.key))
local userid = game.Players:GetUserIdFromNameAsync(name)
local coins = dataStored.value
local template = script.Template:Clone()
template.Name = name .. "Leaderboard"
template.PlrName.Text = name
template.Rank.Text = "#" .. rankInLB
template.Coins.Text = Short.en(coins)
template.Parent = script.Parent
if rankInLB == 1 then
game.Workspace.NpcClicks.Tags.Container.pName.Text = name
game.Workspace.NpcClicks.Configuration.userId.Value = userid
end
end
end)
end
end