I am attempting to use profileservice and currently had everything working fine a couple days ago but now it currently yields forever when I call “LoadProfileAsync”. Here is the player added function
local function onPlayerAdded(player)
--This will intialize the players data
if isDataStoreSafe then
print("is safe")
local profile = GameProfileStore:LoadProfileAsync("PlayerId_"..player.UserId, "ForceLoad")
print("loaded profile")
if profile ~= nil then
if loadedProfiles[player.UserId] == nil then
loadedProfiles[player.UserId] = true
profile:Reconcile()
profile:ListenToRelease(function()
player:Kick("issue with loading your data, please try again later")
SessionProfiles[player.UserId] = nil
end)
if player:IsDescendantOf(Players) then
--assign a key in session data that is a reference to the players profile
SessionProfiles[player.UserId] = profile
loadObjectValues(player)
loadGamepasses(player)
Moderation.playerLoaded(player)
if RunService:IsStudio() == false then
player.Character:WaitForChild("Humanoid").WalkSpeed = GemShopInfo.WalkSpeedLevel[DataController.getData(player, "WalkSpeedLevel", "PrivateStats")].speedAmount
end
RemoteEvents.PlayerFinishedLoading:FireClient(player)
if RunService:IsStudio() then
for _=0,3,1 do
DataController.givePet(player, "Bear")
end
end
else
profile:Release()
end
end
else
player:Kick("issue with loading your data, please try again later")
end
else
player:Kick("There was an issue loading your data, please try again")
end
end
The code prints “is safe” correctly but it yields forever and never prints "loaded profile’ I also get no errors in the output.