Can't see Roblox's built in LeaderStats even with API enabled?

I’ve made a DataStore that will show a certain amount of values when a player earns, leaves, and joins back. However, even when I am 100% sure I have scripted it correctly, it is not showing up. I placed the script (just a script) inside ServerScriptService and enabled API. I am using Roblox’s built in leaderstats (adding a folder and a value like int inside of a folder named “leaderstats”)

The error: The current identity (2) cannot Class security check (lacking permission 1)

Any tips on how I could fix this? Thanks.

can i see the script?

local data = game:GetService(“DraftsService”)
local get = data:GetDataStore(“get”)

game.Players.PlayerAdded:Connect(function(plr)
local Folder = Instance.new(“Folder”)
Folder.name = “leaderstats”
Folder.Parent = plr

local cash = Instance.new("IntValue")
cash.Name = "Money"
cash.Parent = Folder

local info = get:GetAsync(plr.UserId.."Money")
local s, e = pcall(function()
end)
if s then
	cash.Value = info
else
	print("Coudln't load data.")
	warn(e)
end

end)

(loading data part)

Why are you retrieving “DraftsService”? You probably meant “DataStoreService”.

whoops, might of pressed “enter” and made Roblox think that I wanted that. Thanks for noticing.

1 Like

That’s what I thought haha. Happens to me too many times, and no problem.