How do you loop this script down below??
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)
local TimesClicked = 0 script.Parent.mouseClick:connect(function(Player) if script.Parent.Parent.CanCollide == true then local loop = coroutine.wrap(function() while wait() do Player.leaderstats.LifeFormFound.Value = Player.leaderstats.LifeFormFound.Value +1 TimesClicked = TimesClicked +1 end end) loop() end 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)