NOTE: I AM NOT ASKING FOR CODE, JUST ASKING FOR WHAT THE PROBLEM COULD BE.
Extra note: I enabled Studio Access to API services, Http Requests, etc.
Basically, it always errors when it tries to load the stats. I don't know why it does this, and it is a simple check so my scripts can see if the user completed the tutorial on how to use my admin panel.
It always says the error is just "nil" when I warn with the error message from the Protected Call (Pcall)
local DataStoreService = game:GetService("DataStoreService")
local DATASTORE = DataStoreService:GetDataStore("DeluxxeHubDataStore")
game.Players.PlayerAdded:Connect(function(player)
local STATS = player:WaitForChild("DeluxxePanelPlayerStats")
wait()
local hasTutorial = Instance.new("BoolValue")
hasTutorial.Name = "hasTutorial"
hasTutorial.Parent = STATS
local data
local success, errormessage pcall(function()
wait()
data = DATASTORE:GetAsync(player.UserId.."-tutorial")
end)
if success then
hasTutorial.Value = data
else
print("Deluxxe Panel encountered an error while loading data... Sending error.")
warn(errormessage)
end
end)
game.Players.PlayerRemoving:Connect(function(player)
local success, errormessage = pcall(function()
DATASTORE:SetAsync(player.UserId.."-tutorial",player.DeluxxePanelPlayerStats.hasTutorial.Value)
end)
if success then
print("Deluxxe Panel Data Saved for "..player.Name)
else
print("Deluxxe Panel encountered an error while saving data... Sending error.")
warn(errormessage)
end
end)

4 comments
OH, Thank you so much, lol! I forgot the + sign lol,
Where did you learn how to script gksw
@iivSnooxy: I learned to script through a combination of (from most to least significant) reading documentation, trial and error, peer feedback, asking questions, reading books and being taught in school.
= sign*