Player character transparency

Messing with making all my player parts invisible, so I can weld onto creating a basic morph. For some reason only the Head can be made transparent tho and I can’t figure out why

local players = game:GetService("Players")

players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		if char:findFirstChild("Humanoid") ~= nil then
			char.Head.Transparency = 1
			char.UpperTorso.Transparency = 1
		end
		
		end)
	end)

When I join the game, my head is transparent, but I do the exact same thing with UpperTorso and nothing changes, this also wont work with any other part of the R15 rig

1 Like

Are you just wanting to make those 2 parts invisible? Or are you wanting to make the entire character invisible on its own?

Working on making entire character invisible, I just never got past the upperbody

I am able to do this just fine,
Is it showing any errors in chat?

I think the reason it isn’t working for you, is because the character is still loading.

Try this:

...
		if char:findFirstChild("Humanoid") ~= nil then
			char:WaitForChild("Head").Transparency = 1
			char:WaitForChild("UpperTorso").Transparency = 1
		end
...

You could just loop through all of the Character’s children then instead :thinking:

local players = game:GetService("Players")

players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		if char:FindFirstChild("Humanoid") ~= nil then
            print("Making the character invisible")
			for _, BodyPart in pairs(char:GetChildren()) do
                if BodyPart:IsA("BasePart") then
                   BodyPart.Transparency = 1
                end
            end
		end
	end)
end)

Could you try this?

2 Likes

No errors and wait for child doesn’t appear to help, it just doesn’t update the transparency

--try this :)
local players = game:GetService("Players")

players.PlayerAdded:Connect(function(player)
 player.CharacterAdded:Connect(function(char)
     for i, v in pairs(Char:GrtChildren()) do
      if v:IsA("basePart") then  v.Transparency = 1 end
     end
 	end)
 end)

This gets no errors but only turns the head invisible

That’ll just check if v is not a BasePart, which wouldn’t even make sense

Plus that’s a LocalScript, so the changes will only be made on the client & not on the server

Ok but how

Does your Character have any Unions attached to it?

I agree. It should turn everything invisible, I tried it myself and it worked fine.

Maybe it’s the location where he put the script

@MagicbusYT That script should go in ServerScriptService, as a ServerScript

1 Like

I think it might be their specific character

I tried changing my character to theirs and it doesn’t work on it

Thats where it is located, my character is just a baconhair I dont think I have the knowledge to have unions lol

i fixed the location and the code

You aren’t attempting to override the character in any way shape of form?

1 Like

My other scripts are disabled as they are all failed attempts are doing this same thing.

Should I maybe be clearing accessories before doing this?

does at least some parts turn invisible???

I don’t think it’s possible because you cannot set a mesh to be transparent, or change its MeshId

local players = game:GetService("Players")

players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
        print("Making the character invisible")
        for _, BodyPart in pairs(char:GetChildren()) do
            print(BodyPart)
            if BodyPart:IsA("BasePart") or BodyPart:IsA("MeshPart") then
                BodyPart.Transparency = 1
            end
		end
	end)
end)

This is strange, very very s t r a n g e