i made a slot system where the player can create and delete slots
the problem i’m having is when i try to delete the slot
ProfileStore:WipeProfileAsync("Slot_"..SlotNumber..player.UserId)
I use WipeProfileAsync which works, except i get this error
Transform function error ServerScriptService.Main.Modules.ProfileService:983: attempt to index nil with 'ActiveSession'
Then it crashes
I tried using Profiles[player]:Release()
before using WipeProfileAsync, but that didn’t work…
1 Like
by the way
heres some of my other code that handles the slots
local profile = ProfileStore:LoadProfileAsync(player:GetAttribute("Slot") .. player.UserId)
if profile then
print("Profile loaded for player:", player.UserId)
profile:AddUserId(player.UserId)
profile:Reconcile()
profile:ListenToRelease(function()
Profiles[player] = nil
player:Kick()
end)
-- Add to Profiles table
Profiles[player] = profile
print("Profile added to Profiles table for player:", player.UserId)
else
warn("Failed to load profile for player:", player.UserId)
player:Kick()
end
1 Like
What does your Slots_UserID template look like? You could just set the player’s data to the template giving it a wipe?