So for some reason I get this error:
DataStoreService: ValueNotAllowed: double is not allowed in data stores. API: UpdateAsync, Data Store: Leaderboard
whe trying to do this:
local data = game:GetService("DataStoreService"):GetOrderedDataStore("Leaderboard")`
here are my leaderstats:
local DataStoreService = game:GetService("DataStoreService")
local bestLuckStore = DataStoreService:GetDataStore("BestLuckStore")
local players = game:GetService("Players")
players.PlayerAdded:Connect(function(player)
local savedBestLuck = bestLuckStore:GetAsync(player.UserId)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local bestLuckValue = Instance.new("NumberValue")
bestLuckValue.Name = "BestLuck"
bestLuckValue.Parent = leaderstats
if savedBestLuck ~= nil then
bestLuckValue.Value = savedBestLuck
end
bestLuckValue.Changed:Connect(function(newBestLuck) -- luck = 99.1
newBestLuck = newBestLuck * 10 -- new its = 991
bestLuckStore:SetAsync(player.UserId, newBestLuck)
end)
end)
I thought the problem was that it could not get deciamls so I did this but still I get the error