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.