basically, when the player touches the part all his body gets invisible except the head so how do I make the same script but for a gui so that when the player clicks on the GUI button the same thing happens but with a gui button as a click function and not a touch function
function onTouch(part)
local human = part.Parent:findFirstChild("Humanoid")
if human ~= nil then
part.Parent:findFirstChild("Head").Transparency = 0
part.Parent:findFirstChild("Torso").Transparency = 1
part.Parent:findFirstChild("Left Arm").Transparency = 1
part.Parent:findFirstChild("Right Arm").Transparency = 1
part.Parent:findFirstChild("Left Leg").Transparency = 1
part.Parent:findFirstChild("Right Leg").Transparency = 1
end
end
script.Parent.Touched:connect(onTouch)
