I use this script
local TimesClicked = 0
script.Parent.mouseClick:connect(function(Player)
if script.Parent.Parent.CanCollide == true then
Player.leaderstats.LifeFormFound.Value = Player.leaderstats.LifeFormFound.Value +1
TimesClicked = TimesClicked +1
if TimesClicked == 1 then
script.Parent.Parent.Transparency = 1
script.Parent.Parent.CanCollide = false
wait(3)
script.Parent.Parent.Transparency = 0
script.Parent.Parent.CanCollide = true
end
end
end)
for the first time, it works but when I click the brick the second time it did not turn invisible

3 comments
Thx
Why are you saying TimesClicked ~= nil. TimesClicked is a number, not an object.
Values can have a value as nil