Wait for character to fully load in?

local Players = game:GetService("Players")

local function onCharacterAdded(character) task.wait(1)
	

	for i,Child in pairs (character:GetChildren()) do
		if Child:IsA("Accessory") then

			local Part = Child:FindFirstChildWhichIsA("Part")
			local Weld = Part.AccessoryWeld
			local Head = character.Head
			
			if Weld.Part1 == Head then
				
			else
				Child:Destroy()		
			end
			
		end
	end
end



local function onPlayerAdded(player)
	player.CharacterAdded:Connect(onCharacterAdded)
end

Players.PlayerAdded:Connect(onPlayerAdded)

heya guys I have an issue and its that without the wait the script just doesn’t work, im guessing its because its 2 fast, any idea how I could wait until the character has fully loaded in ?

1 Like

Try using player.CharacterAppearanceLoaded rather than CharacterAdded
https://developer.roblox.com/en-us/api-reference/event/Player/CharacterAppearanceLoaded

11 Likes

worked perfectly :smiley: , thank you a lot!!!

2 Likes