How to make full player invisible?

Does anyone know how I can make a players full avatar go invisible even the hats and such?

2 Likes

function makeInvisible(bool)for _,obj in pairs(script.Parent:GetDescendants())do if obj:IsA("BasePart") and obj.Name ~= "HumanoidRootPart" then obj.Transparency = (bool and 1) or 0 end end end
Add this to your code and then do makeInvisible(true)

You’ll have to loop through everything the player is wearing and then set the transparency for each of them to 1.

Sample server script:

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player) 

	player.CharacterAdded:Connect(function(character)
		for _, body in pairs(player.Character:GetDescendants()) do -- Loop through everything a player is wearing
			if body:IsA("Shirt") or body:IsA("ShirtGraphic") or body:IsA("Pants") or body:IsA("Accessory") or body:IsA("Hat") or body:IsA("CharacterMesh") or body:IsA("BodyColors") then
				body.Transparency = 1
			elseif body.Name == "Chest" or body.Name == "Arm1" or body.Name == "Arm2" or body.Name == "Leg1" or body.Name == "Leg2" or body.Name == "ExtraFeatures" or body.Name == "ExtraFace" then
				body.Transparency = 1
			end
		end
	end)
end)
1 Like
function MakeInvisible(Player)
	local Character = Player.Character or Player.CharacterAdded:Wait()
	task.wait()
	if Character then
		for i,v in pairs(Character:GetDescendants()) do
			if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" then v.Transparency = 1 end
		end
	end
end

Also if you want to make them visible again, you can rewrite this function and replace the transparency with 0 but make sure the HumanoidRootPart’s transparency remains 1.

2 Likes

also check for decals to make faces and t shirts invisible too