MadStudioRoblox / ProfileService

Universal session-locked savable table API
https://madstudioroblox.github.io/ProfileService/
Apache License 2.0
292 stars 157 forks source link

Attempt to index nil with Release #22

Closed checkm4te8 closed 2 years ago

checkm4te8 commented 2 years ago

Hey, I know this is my third issue and I apologize for that, really but I have another problem. I get the error attempt to index nil with release for some reason, sometimes, any idea why?


    local ProfileKey = "Player_"..UserId
    local profile = ProfileStore:LoadProfileAsync(ProfileKey, "ForceLoad")
    profile:Release()
    return profile
end
lucasmz-dev commented 2 years ago

You need to check that the profile is returned or not, if it's not, then it wasn't able to load properly.

checkm4te8 commented 2 years ago

You need to check that the profile is returned or not, if it's not, then it wasn't able to load properly.

How can I check that?

lucasmz-dev commented 2 years ago

@MegamiShin

if profile == nil then