Knowing me there is an error in here, but i just dont know where its not working, this code is meant to make a part go invisible after 10 clicks and it does it on the first click, help will be much appreciated :) thanks!
function onClick()
script.Parent.Value.Value = script.Parent.Value.Value + 1
if script.Parent.Value.Value ~= 10 then
script.Parent.Transparency = 1
else
end
end
script.Parent.ClickDetector.MouseClick:connect(onClick)

3 comments
Even with yours it seems to not work, i can't seem to figure it out, the click value keeps going over 10 and doesn't go invisible
The click will go over 10 as we have not set any limits e.g. stop adding once we have 10, I will update the code to add a print() in this should show how far the code runs.
thanks :)