103: double is not allowed in data stores

. 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
		for i, leaderboardRank in pairs(script.Parent:GetChildren()) do
			if leaderboardRank.ClassName == "Frame" then
		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
1 Like

You are using an ordered data store, and I’m pretty sure ordered data stores can only store integers.

I might be wrong though.

1 Like

Numbers that include decimals cannot be stored in DataStores, hence ‘integers’. An alternative option is to store it as a whole number (by multiplying up) and when you need those values, divide them back down.

1 Like