Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Change a players face decal when clicking a brick?

Asked by 6 years ago

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

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

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.

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  MRbraveDragon 374 — 6y
0
It works, but only for Roblox own faces. Is it possible to have it work for my own uploaded decals? felonymartinez 12 — 6y
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 MRbraveDragon 374 — 6y
0
Worked! Thanks a ton felonymartinez 12 — 6y
View all comments (2 more)
0
No problem! MRbraveDragon 374 — 6y
0
Mind accepting my answer? Thanks MRbraveDragon 374 — 6y
Ad

Answer this question