How to make decal visible when part becomes visible?

Hello, I’m having some trouble when trying to make a decal visible. The decal is located on Hammer2. When Hammer1 is clicked in the script, it becomes transparent while Hammer2 becomes visible. The problem, like stated before, is the fact is that I also need a transparent decal ON Hammer2 to become visible when the part becomes visible. How do I do this?

Here’s the script:

local Hammer1 = script.Parent
local Hammer2 = script.Parent.Parent.Hammer2
local detector = script.Parent.ClickDetector

Hammer1.ClickDetector.MouseClick:Connect(function()
	Hammer1.Transparency = 1
	Hammer1.CanCollide = false
	Hammer2.Transparency = 0
	Hammer2.CanCollide = true
end)

local Hammer2 = script.Parent
local Hammer1 = script.Parent.Parent.Hammer1

Hammer1.ClickDetector.MouseClick:Connect(function()
	Hammer2.Transparency = 1
	Hammer2.CanCollide = false
	Hammer1.Transparency = 0
	Hammer1.CanCollide = true

end)

Sorry if I don’t describe this well. I’m not extremely good with scripting.

well your script is a bit confusing, idk why you made a variable that was never used,

but i think for your question, just

Hammer2.decal.Transparency = 0

float Transparency Determines the transparency of the Decal with 0 being completely opaque and 1 completely transparent.

1 Like

Oh yeah, I added that variable for a totally different reason which I didn’t end up using. I forgot to remove it, haha.

Thank you for the response!