I am trying to make a script for spleef. The script is a regular script in the part in workspace. Here is the script. How do I make it so that the part (SpleefP) Will make the transparency stop at 0.9?
game.Workspace.SpleefP.Touched:connect(function(hit) for i=1,9 do wait(0.1) game.Workspace.SpleefP.Transparency = game.Workspace.SpleefP.Transparency + 0.1 end end)
SpleefP is the part name. I figured that since the transparency is set to 0 automatically then you would have to ADD 0.1
"i" Is the index, dude, it's maximum index is 9. so 9/10 = 0.9, Real basic math.
local Sp=Workspace.SpleefP local Debounce=false Sp.Touched:connect(function(hit) if Debounce==false then Debounce=true for i=1,9 do wait(.1) Sp.Transparency=Sp.Transparency+i/10 end Debounce=true end)