I am making a small project where when a player touches a brick, a seed will slowly emerge (become opaque after being transparent). This is the script :
script.Parent.Touched:connect(function()
for i = 1, 0 , -0.01 do
game.Workspace.Seed.Transparency = i
wait()
end
end)
I successfully achieved that, but whenever the brick is being touched by a player even a little bit it keeps repeating this same loop. I want it to stop looping after the seed emerges. How do I stop a loop?
Thanks!
EDIT: I used a debounce.

1 comment
http://wiki.roblox.com/index.php?title=RBXScriptSignal#Usage_2