How do you make the player's head invisible by changing the head's transparency to 1 when the part is clicked?
local debounce = true function onClicked() if debounce == true then debounce = false --Make the player's head invisible by changing the head's transparency to 1. debounce = true end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
ROBLOX actually had an arument for the player who created contact with the ClickDetector imputed by the Part.
local debounce = true function onClicked(playerWhoClicked) if debounce == true then debounce = false playerWhoClicked.Character:WaitForChild("Head").Transparency = 1 wait(1) -- without a wait, it's not a true debounce. debounce = true end end script.Parent.ClickDetector.MouseClick:connect(onClicked)