CharacterAppareanceLoaded not working

Im trying to make the player invisible when it spawn’s with CharacterAppareanceLoaded, but it doesn’t seem to work.

There’s the script

local function characterTransparency(Character)
for _, v in pairs(Character:GetDescendants()) do
if v:IsA(“Part”) or v:IsA(“Decal”) then
v.Transparency = 1
if v.Name == "Head"then
v.face.Transparency = 1
elseif v.Name == “HumanoidRootPart” then
v.Transparency = 1
end
elseif v:IsA(“Accessory”) then
v.Handle.Transparency = 1
end
end
end

Players.PlayerAdded:Connect(function(Player:Player)
Player.CharacterAppearanceLoaded:Connect(function(Character)
characterTransparency(Character)
end)
end)

It’s an script and the parent is ServerScriptService
However, when using CharacterAdded makes it work but, i want it to work when it’s fully loaded, because if i dont it will cause accessory errors (Accessories not being invisible sometimes)

Alright, i identified that it’s the StarterCharacter what’s causing it, but how could i make the player invisible when he has a startercharacter? (And visible too)

It’s possible that CharacterAppearanceLoaded doesn’t check StarterCharacter’s.

That means this is a bug? im actually a bit confused.

Can you try this script in serverscriptservice and check if you still have the same issue?

for i,player in pairs(game.Players:GetPlayers()) do
local Character = player.Character or player.CharacterAdded:Wait()
for i,v in pairs(Character:GetDescendants()) do
if v:IsA("BasePart") or v:IsA("Decal") or v:IsA("Accessory") then 
v.Transparency = 1 -- make it invisible
end
end
end
end

i completely messed up, hold on

It works but i actually do not know about the accessories, about on the above i said, However, when using CharacterAdded makes it work but, i want it to work when it’s fully loaded, because if i dont it will cause accessory errors (Accessories not being invisible sometimes)

I do not really know if this will happen, because the last time i made something like this sometimes the accessory wasn’t invisible because i was using CharacterAdded.

I replaced the for i,player to the PlayerAdded and it works but the only problem now is from the above.

Try this script instead

local Players = game:GetService("Players")
local function playerAdded(player)
player.CharacterAppearanceLoaded:Connect(function(character)
local humanoid = character:WaitForChild("Humanoid")

for i, accessory in pairs(humanoid:GetAccessories()) do
     i.Transparency = 1
end

for _, player in pairs(Players:GetPlayers()) do 
	playerAdded(player)
end

Players.PlayerAdded:Connect(playerAdded)

I understand what you’re trying to do but I wasn’t too sure if there was a recent solution for this…

What im thinking about now is that i think CharacterAppearanceLoaded just straight ignores StarterCharacter, but when i put CharacterAdded works so ill try doing repeat until.

This works so i guess ill leave it here, thank’s for everything tho.

No problem, I’m glad this problem is fixed…

The 'CharacterAppearanceLoaded` event/signal only fires if the player’s on-site appearance loads, it is not compatible with custom starter characters.

local Game = game
local Players = Game:GetService("Players")

local function OnPlayerAdded(Player)
	local function OnCharacterAdded(Character)
		task.wait() --Wait for engine operations.
		for _, Descendant in ipairs(Character:GetDescendants()) do
			if (Descendant:IsA("BasePart") or Descendant:IsA("SurfaceAppearance")) then Descendant.Transparency = 1 end
		end
	end
	
	Player.CharacterAdded:Connect(OnCharacterAdded)
end

Players.PlayerAdded:Connect(OnPlayerAdded)
2 Likes

Then, should i use CharacterAdded?

I had some troubles with CharacterAppearanceLoaded not always working. Putting a task.wait() immediately after that event fires seems to have fixed it for me.

CharacterAppearanceLoaded event only work on the server script.

server

local CharacterFullyLoaded = game.ReplicatedStorage.CharacterFullyLoaded

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAppearanceLoaded:Connect(function()
        CharacterFullyLoaded:FireClient(player)
    end)
end)

client

local CharacterFullyLoaded = game.ReplicatedStorage.CharacterFullyLoaded

CharacterFullyLoaded.OnClientEvent:Connect(function()
    -- Code
end)