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

How could I make a script that adds a mesh into players when entering?

I am trying to make a cool game, and I want to know how to add a block mesh into every body part of a player except for the head when they join/respawn. I also want to know how to add a head mesh into a player's head under these conditions. Any advice?

2 answers

✓ Accepted answer
game.Players.PlayerAdded:connect(function(Player)
	Player.CharacterAdded:connect(function(Character)
		for i, part in pairs(Character:GetChildren()) do
			if part:IsA("Part") then
				if part.Name ~= "Head" then
				local Mesh = Instance.new("SpecialMesh", part)
				Mesh.Name = "Mesh"
				Mesh.MeshId = ""
				Mesh.TextureId = ""
				Mesh.MeshType = "Head" -- Whatever mesh type you want in it.
				else
				local Mesh = Instance.new("SpecialMesh", part)
				Mesh.Name = "Mesh"
				Mesh.MeshType = "Head"
				end
			end
		end
	end)
end)

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