I'm trying to make a part go from transparency = 0 to transparency = 1 onClicked.
For some reason it's not working, idk how to fix it.
local Part = script.Parent
function onClicked(playerWhoClicked)
Part.Transparency > 0 do
Part.Transparency = Part.Transparency - 1
wait(1)
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Any help would be greatly appreciated!

1 comment
And yes, it has a click detector.