--Hello! Please put me inside of a R6 dummy
--this script loads the local players avatar


local Players = game:GetService("Players")

local function handlePlayerAdded(player)
	local id = player.UserId
	local success, result = pcall(function()
		return Players:GetCharacterAppearanceAsync(id)
	end)

	if success then
		local Models = result
		Models.Parent = script.Parent

		wait()

		for i, v in pairs(Models:GetChildren()) do
			print(v.Name)
			v.Parent = script.Parent
			wait()
		end
	else
		warn("Failed to get character appearance for player " .. player.Name)
	end
end
