I'm currently working on an infection type game and I need help changing the face on the playermodel once you get switched to the infected team.
local faceId = "http://www.roblox.com/asset/?id=501885626"
game.Players.PlayerAdded:Connect(function(player)
player.Changed:Connect(function(att)
if att == "Team" then
local char = player.Character or player.CharacterAdded:Wait()
local head = player:WaitForChild("Head")
local decal = head:WaitForChild("face")
local desc = game.Players:CreateHumanoidModelFromUserId(player.UserId)
local normalFace = desc.Face
desc:Destroy()
if player.Team == game.Teams.Infected then
decal.Texture = faceId
elseif player.Team == game.Teams.Survivors then
decal.Texture = normalFace
end
end
end)
end)
This is the code I have so far. Whenever I am testing and switch to the infected team it outputs Infinite yield possible on 'Players.jackcough62689:WaitForChild("Head")' Any help would be greatly appreciated.

6 comments
I did this and now I get the error Face is not a valid member of Model "Player"
What line is the error in?
Line 9
are u sure u added my code? I dont see a reason that the error should be there
I found a fix for it, thanks for the help.
Im curious what the problem was, can you explain where the error was int he script? and if my answer helped you solve your problem please accept it