Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

how do i make a player spawn in as a certain avatar?

I need the players to spawn in as a blank character, and later customize it, how do i do this?

2 answers

Go to StarterPlayer and uncheck LoadCharacterAppearance in Properties

You can go to StarterPlayer and uncheck LoadCharacterAppearance in Properties

or if you want to do it with a script you can use a generic loop and have it destroy the aspects that customizes the character

game:GetService("Players").PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function(character)
		humanoid = character:WaitForChild("Humanoid")
		for _, v in ipairs(character:GetChildren()) do
			if v:IsA("Accessory") or v:IsA("BodyColors") or v:IsA("Pants") or v:IsA("Shirt") then
				v:Destroy()
			elseif v:IsA("Part") then
				v.BrickColor = BrickColor.new("putcolorhere")
		end
	end)
end)

If you also want the face to be set default from the script here's the modified version that removes the face (you'll have to find the default face asset ID and put it there)

game:GetService("Players").PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function(character)
		humanoid = character:WaitForChild("Humanoid")
		for _, v in ipairs(character:GetChildren()) do
			if v:IsA("Accessory") or v:IsA("BodyColors") or v:IsA("Pants") or v:IsA("Shirt") then
				v:Destroy()
			elseif v:IsA("Part") and not v.Name == "Head" then
				v.BrickColor = BrickColor.new("putcolorhere")
			elseif v.Name == "Head" then
				if v:FindFirstChild("face") then -- if face is not the name of the decal change it to the correct name since i wouldn't know what the face decal is called
					v.face.Texture = "" -- add asset id, also if texture isn't the correct property, change it since I don't really work with decals that much
			end
		end
	end)
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.