So I got the script finally to make it dissapear in Spleef but now once the script is done it does not go to 1 transparency again. Like when I hit it, after I hit it, it does not work...
local Sp = game.Workspace.Part local Debounce = false Sp.Touched:connect(function(hit) if Debounce == false then Debounce = true for i = 1, 9 do wait(0.1) Sp.Transparency = Sp.Transparency + i/10 end end Debounce = true wait(1) Sp.Transparency = 0 Sp.CanCollide = false wait(1) Sp.CanCollide = true end)
You never change Debounce back to false. Change your code so it looks like this:
local Sp = game.Workspace.Part local Debounce = false Sp.Touched:connect(function(hit) if Debounce == false then Debounce = true for i = 1, 9 do wait(0.1) Sp.Transparency = Sp.Transparency + i/10 end end Debounce = false wait(1) Sp.Transparency = 0 Sp.CanCollide = false wait(1) Sp.CanCollide = true end)