PcoWSkbVqDnWTu_dm2ix

Changing Torsos into Spheres

Changing Torsos into Spheres

Jun 14 2019, 4:46 PM PST

You want to make the torso of all Roblox characters a sphere.

Use a SpecialMesh with a MeshType of Sphere.

game.Players.PlayerAdded:connect(function(pl)
	pl.Character:connect(function(c)
		repeat wait() until c:FindFirstChild('Torso')
		local mesh = Instance.new('SpecialMesh')
		mesh.MeshType = Enum.MeshType.Sphere
		mesh.Parent = c.Torso
	end)
end)

There are several different types of ways you can get a mesh on a part, but there is an object called a SpecialMesh which provides us with a couple of preset meshes. One of these presets happens to be Sphere.

First we connect the PlayerAdded event as well as the CharacterAdded event. We then proceed to wait until the Torso is in the Character. Then we create a SpecialMesh inside of the torso of the new character. We then set the type of the new mesh to be a sphere using the MeshType enumeration.

Tags:
  • humanoid
  • script