How to make this a datastore



game.Players.PlayerAdded:Connect(function(player)
	local avataritemsfolder = Instance.new("Folder")
	avataritemsfolder.Parent = player
	local shirtneed = avataritemsfolder:FindFirstChildWhichIsA("Shirt")
	local pantneed = avataritemsfolder:FindFirstChildWhichIsA("Pants")
	local accessoryneed = avataritemsfolder:FindFirstChildWhichIsA("Accessory")
	
	shirtneed.Parent = game.Players.localPlayer.Character
	pantneed.Parent = game.Players.localPlayer.Character
	accessoryneed.Parent = game.Players.localPlayer.Character
end)

game.Players.PlayerRemoving:Connect(function(Player)
	local shirt = game.Players.localPlayer.Character:FindFirstChildWhichIsA("Shirt")
	local pant = game.Players.localPlayer.Character:FindFirstChildWhichIsA("Pants")
	local accessory = game.Players.localPlayer.Character:FindFirstChildWhichIsA("Accessory")
	shirt.Parent = game.Players.localPlayer.avataritemsfolder
	pant.Parent = game.Players.localPlayer.avataritemsfolder
	accessory.Parent = game.Players.localPlayer.avataritemsfolder

end)
2 Likes

im unsure how to turn this into a datastore

1 Like

Use DataStoreService and save the IDs. Is that the question? It’d be more better if you had some information on what you’re trying to do or trying to figure out.

The items Dont have id’s they are items inside a folder