.CharacterAdded and .CharacterAppearanceLoaded not firing

In my game, I am using a StarterCharacter. For some reason when I try to get the character using CharacterAdded or CharacterAppearenceLoaded, neither functions fire. Is it something to do with me using a StarterCharacter?

Players.PlayerAdded:Connect(function(Player)
	local customizationData = GetData(Player)
	if customizationData ~= false then
		local AccSel = customizationData.AccSel
		local HairSel = customizationData.HairSel
		local PantsSel = customizationData.PantsSel
		local ShirtSel = customizationData.ShirtSel
		local SkinSel = customizationData.SkinSel
		
		game.Workspace.ChildAdded:Connect(function(Child)
			if Child.Name == Player.Name then
				print("Character Added")
			end
		end)
	end
end)

I tried to work around it by using this system, but it doesnt fire also.

1 Like

So basically any script inside of starter character will never have these functions run, because when the script is loaded, its loaded into the character, meaning the character already exists.

If you want to get the character you can just do this:

local Character = script.Parent

Hope this helps some :D

3 Likes

Perhaps using something like this may help?

local function GetCharacter(plr)
	local character
	repeat
		task.wait(1/60)
		character = plr.Character or Workspace:FindFirstChild(plr.Name)
	until character ~= nil
	return character
end

This is by no means efficient but it may be something lol.

2 Likes

I used something similar and it works

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.