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

How to change face when tool is equipped?

Asked by 6 years ago

I need a script that make when you have the tool your change face but when is unequipped you have your original face! I very need help because I don't find anywhere how to do this!

0
Jesus, what part of "this is not a request site" do you not get? GIassWindows 141 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

If you want to make it so that a block of code runs when your tool is equipped, (in your case, change the face of a player) you must insert a script into the tool containing:

local EQUIPPEDFACEID = 14812835 --Enter the ID of the face you want when the tool is equipped.

script.Parent.Equipped:connect(function() --Called when the tool is equipped.
    wait(0.3)
    script.Parent.Parent.Head.face.Texture = "http://www.roblox.com/asset/?id=".. EQUIPPEDFACEID --Changes the user's character's face.
end)

script.Parent.Unequipped:connect(function() --Called when the tool is unequipped.
    wait(0.3)
    script.Parent.Parent.Parent.Character.Head.face.Texture = "rbxasset://textures/face.png" --Changes the user's character's face back to normal.
end)

Also make sure that the script's Parent is just the tool itself not any part inside it.

Ad

Answer this question