Issue with deleting player's face

I know this seems pretty easy to do, but for some reason it wont work for me.

I am somewhat of a beginner scripter so I may need help. Here is my code:

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		char.Head.face:Destroy()
	end)
end)

What I am trying to achieve is a script that will delete the users face when they join.
This is being ran in a script inside of ServerScriptService, no idea why its not working.

Edit: I forgot to mention, it is giving nothing in the output as well, and I used prints to find out that the CharacterAdded and PlayerAdded functions are working, but the face just wont delete.

Maybe players head isnt loaded when you are trying to destroy the face, try adding a task.wait(0.5) before destroying the face, or change it to char:WaitForChild("Head").face:Destroy()

I’ve already tried this, it doesnt work.

Replacing to transparent also doesn’t working?

Try this

Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		character:FindFirstChild("Head").face:Destroy()		
	end)
end)

I know you said you tried this but try again

local head = char:WaitForChild("Head")
local face = head:WaitForChild("face")
face:Destroy()
1 Like

You could do

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		wait(1)
		char.Head.face.Texture = 0
	end)
end)
1 Like

Instead of looking for the face decal inside of the head, you could find it through it’s class and then destroy it.

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		local Face = Character:WaitForChild("Head"):FindFirstChildOfClass("Decal")
		if Face then
			Face:Destroy()
		end
	end)
end)

Replacing to transparent wont work.

That doesn’t work either. I think it might be a Roblox issue.

This would interfere with my other scripts (which places two decals, one for a mouth, one for eyes inside the head so I can change the eyes decal over time to make it look animated when they blink)

Hey Ryan,

The issue might be that it cant find a face inside of a player’s head.

U can always try this code.

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		task.spawn(function()
			task.wait(1)
			local face = Character.Head:FindFirstChild("face")
			if face then
				face:Destroy()
			end
		end)
	end)
end)

Let me know if it worked! :smiley:

It still didn’t work. And once again did not print anything to the output.

Is that the only code inside of the script? Is there anything that could be preventing the code from working?

This is the only code in the script, and I temporarily removed everything else from the game, it still wont work.

I have also tried other games and it wont work in them either.

Also I thought I should mention my Roblox Studio is in the most recent version as well.

Maybe double check you have the script inside of ServerScriptService.
I’m sure you probably already have it in there but it never hurts to double check.

The scripts that were posted here work for me.

I have it in ServerScriptService.

I reinstalled Roblox Studio and still get the problem, even on different accounts.

Try removing the face first before placing the eye decals