How to make a Tool change the player's face while held?

Hey there, I’m currently developing a mechanic where holding a gear changes certain parts of the game.
However there is one specific detail that I’m trying to achieve, but I don’t really know how to do it.
I want to make it so holding the gear causes the player’s face (which is set to a specific StarterPlayer model) to change color.
So far I have made it so the model’s head has two different face decals, one with the default color and one with the red color, with the red face having a higher Zindex but having the Transparency set to 1.
What I need to do now is make it so holding the gear changes the red face’s transparency to 0, so it overlaps the default face while the gear is held.
This is my script so far:

local tool = script.Parent
local on = game.SoundService.FireEnabled
local off = game.SoundService.FireDisabled
local sfx = game.SoundService.FlameSFX

tool.Equipped:Connect(function()
	on:Play()
	sfx.Playing = true
	workspace.Interact.ProximityPrompt.Enabled = true
end)

tool.Unequipped:Connect(function()
	off:Play()
	sfx.Playing = false
	workspace.Interact.ProximityPrompt.Enabled = false
end)

Still learning to script, so I apologize if the question is too simple.

1 Like

So you would have to define the face as a variable and then change the transparency
after equipping it heres an example:

local tool = script.Parent
local face = ???
local on = game.SoundService.FireEnabled
local off = game.SoundService.FireDisabled
local sfx = game.SoundService.FlameSFX

tool.Equipped:Connect(function()
	on:Play()
        face.Transparency = 0
	sfx.Playing = true
workspace.Interact.ProximityPrompt.Enabled = true
end)

tool.Unequipped:Connect(function()
	off:Play()
	sfx.Playing = false
        face.Transparency = 1
	workspace.Interact.ProximityPrompt.Enabled = false
end)```
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.