Any other ways to prevent tools from not saving, if the user has left the game?

kinda hard to explain but basically what im doing is using profileservice to store a table which contains the name of every tool inside the backpack (along with the amount of tools there are) but CharacterRemoving refuses to unequip all tools from the character, no matter what, i’ve tried reparenting the tool and using :UnequipTools, if anyone has any suggestions on how to prevent this from happening, or an alternative method please let me know.

1 Like

Convert your table to JSON object which you can store in the datastore

local HttpService = game:GetService("HttpService");
local objectForDatastore = HttpService:JSONEncode({
	someItem = "afafasfaf",
	anotherOne = 32142134,
	yetAnotherOne = false
})

I’m able to save whole bases and storyline with this method :+1:

Edit:
To recover your data from the datastore

local loadedData = HttpService:JSONDecode(datastoreData);

i dont like messing with json and datastores, i’ve lost several data to it, maybe try to think of another method?
(plus im talking about, how to unequip all tools when the character is removing.)

You can do that like this

humanoid:UnequipTools();

This sounds like a you problem, I recommend looking into JSON since this method of storing data is used not only in roblox but probably every object oriented progamming language you will encounter.

That being said, no i have no other option

read my post again, i said that UnequipTools doesnt work for me, i’ll just try to find a solution or wait for someone to give me one, thanks anyways.