My warning is
ServerScriptService.PlayerDataHandler:21: attempt to call missing method ‘LoadProfileAsync’ of table
I am not sure what the issue is here is my code
local PlayerDataHandler = {}
local ProfileStore = require(script.Parent:FindFirstChild(“BaseModules”):WaitForChild(“ProfileService”))
local dataTemplate = require(script:WaitForChild(“Attributes”))
local players = game:GetService(“Players”)
local profileStorage = ProfileStore.GetProfileStore(
“PlayerProfile”,
dataTemplate.Stats,
dataTemplate.Inventory,
dataTemplate.HotBar
)
local profiles = {}
dataTemplate:New()
local function PlayerAdded(player)
local profile = ProfileStore:LoadProfileAsync (“Player_”…player.UserId)
if profile then
profile:AddUserId(player.UserId) -- loads profile
profile:Reconcile()
-------------------------------------------------------------------------------------
profile:ListenToRelease(function()
profile[player] = nil
player:Kick()
end)
-------------------------------------------------------------------------------------
if player:IsDecendantOf(players) then
profiles[player] = profile
print(profiles[player].Data)
else
profile:Release()
end
--------------------------------------------------------------------------------------
else
print("New Player")
end
end
function PlayerDataHandler:Init()
for _ , player in game.Players:GetPlayers() do
task.spawn(PlayerAdded, player)
end
game.Players.PlayerAdded:Connect(PlayerAdded)
game.Players.PlayerRemoving:Connect(function(player)
if profiles[player] then
profiles[player]:Release()
end
end)
end
local function GetProfile (plr)
assert(profiles[plr], string.format(“Data does not exist for %s”… plr.UserId))
return profiles[plr]
end
–Get/Set Data
function PlayerDataHandler:Get (Player, data)
local profile = GetProfile(Player)
assert(profile.Data[data], string.format("Data does not exist for %s",data))
return profile.Data[data]
end
function PlayerDataHandler:Set (Player, data, value)
local profile = GetProfile(Player)
assert(profile.Data[data], string.format(“Data does not exist for %s”,data))
assert(type(profile.Data[data] == type(value)))
profile.Data[data] = value
end
function PlayerDataHandler:Update (Player, data, callBack)
local profile = GetProfile(Player)
local oldData = self:Get(Player, data)
local newData = callBack(oldData)
self:Set(Player, data, newData)
end
return PlayerDataHandler
here is my set uip