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

Change a players face decal when clicking a brick?

How would I go about making a script for when a brick is clicked the players face decal changes?

1 answer

✓ Accepted answer

Put a ClickDetector and a Script inside a part. This is the script:

script.Parent.ClickDetector.MouseClick:connect(function(Player)
	Player.Character.Head.face.Texture = "http://www.roblox.com/asset/?id=110287983"--Decal Id
end)

How it works: The script it activated when the ClickDetector inside the part is clicked. Once it is clicked it will get the Player who clicks it and change the Player's face's texture to the decal id.

6 comments

0

I suggest checking these out:                                             https://wiki.roblox.com/index.php?title=API:Class/ClickDetector/MouseClick                         https://wiki.roblox.com/index.php?title=Creating_Parts_via_Code 

0

It works, but only for Roblox own faces. Is it possible to have it work for my own uploaded decals?

0

I've tried it and it seems that you need to have the decal already in the game, or else it won't load in

0

Worked! Thanks a ton

0

No problem!

0

Mind accepting my answer? Thanks

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