How do i make a character that shows your avater

Hi, im trying to get player id since you are the only one playing in the server
thanks, if you helped me :slight_smile:

-- i got this from a model

local id = ---(get player id)
local Models = game.Players:GetCharacterAppearanceAsync(id)
Models.Parent = script.Parent
wait()
for i,v in pairs(Models:GetChildren()) do
	print(v.Name)
	v.Parent = script.Parent
	wait()
end

to get the player ID, you can wrap this whole code in a PlayerAdded event.

I’ll show you down below

game.Players.PlayerAdded:Connect(function(plr)
	
	local ID = plr.UserId
	local model = game.Players:GetCharacterAppearanceAsync(ID)
	wait()
	for index, v in pairs(model:GetChildren()) do
		print(v.Name)
	end
	wait()
end)