Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why doesn't the face get removed?

game.Players.PlayerAdded:connect(onPlayerRespawned)
function onPlayerRespawned(newPlayer)
wait(.1)
newPlayer.Character.Head["face"]:remove() ---- this line
newPlayer.Character.Head.Transparency = 0.99
newPlayer.Character.Torso.Transparency = 1
newPlayer.Character["Left Leg"].Transparency = 1 
newPlayer.Character["Right Leg"].Transparency = 1 
newPlayer.Character["Left Arm"].Transparency = 1  
newPlayer.Character["Right Arm"].Transparency = 1   
end
function onPlayerEntered(newPlayer)
	newPlayer.Changed:connect(function (property) -- to see
		if (property == "Character") then
			onPlayerRespawned(newPlayer)
		end
	end)
end

game.Players.PlayerAdded:connect(onPlayerEntered)

everything is fine except removing the face. did i do something wrong?

2 comments

0

I believe your problem is a simple fix. Lua is case-sensitive. You did not capitalize the "f" in "Face".

0

It is lower case. It is spelled right.

1 answer

✓ Accepted answer

Hello. I have experienced this same problem also. I tried many different things, but what I believe worked was a small wait of 5 seconds before removing the face.

Another reason it may not work is because :remove() has been deprecated (which means it no longer works). Try :destroy() instead.

3 comments

0

You could always do :WaitForChild() instead of waiting 5

0

WaitForChild() Won't work... I tried that. Well, at least didn't work for me.

0

@DrDominicOConnor, Depreciated doesn't mean it doesn't work.

This discussion is preserved as it was. New answers, comments, and votes are closed.