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)
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