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

Im trying to change the face of my character in game but its not working can anyone help?

So im trying to make a game that i thought was a pretty good idea. Inside of the game i need to change any player that join's face to a decal. Ive tried a couple different ways to do it. Every way ive tried hasn't worked. This is the closest ive gotten so far, can anyone help?

function PlayerAdded(Player)

	wait(0.1)

	Player.Character.Head.face.Texture = "rbxasset://346551564"

end

game.Players.PlayerAdded:Connect(PlayerAdded)

2 comments

0

Try having it change the texture after the Player.CharacterAdded event has fired. This is because when the PlayerAdded event is fired, the character usually has not yet spawn.

0

You do not need a script, you can go in studio click the big blue settings icon on the HOME tab and select the setting Avatar and it will let you change the face ID of every player.

1 answer

Hello! Insert a Script in Workspace and place this:

game.Players.PlayerAdded:connect(onPlayerRespawned)
function onPlayerRespawned(newPlayer)
local texture = "rbxassetid://0000"--Replace 0000 with image ID

    wait(0.1)
    newPlayer.Character.Head.face.Texture = texture

end

function onPlayerEntered(newPlayer)
	newPlayer.Changed:connect(function (property)
		if (property == "Character") then
			onPlayerRespawned(newPlayer)
		end
	end)
end
game.Players.PlayerAdded:connect(onPlayerEntered)

It will only load images [not decals]. I hope that helps you. Good luck

1 comment

0

Instead of just giving answers, it helps to give explanations. Spoonfeeding never benefits the requestee.

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