So this is my script which slowly turns another brick known as "seed" invisible if a player steps on another part.
local seed = game.Workspace.Seed
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid")then
for i= 0,1,-0.01 do
seed.Transparency = i
wait()
end
end
end)
It works only If I get rid of the for loop, and change it to 'seed.Transparency = 1'. Why is this? Do for loops not work with functions and 'FindFirstChild'?

5 comments
Oh! Thank you so much, you explained it perfectly and it worked. One more thing, how do I disconnect this function so I can only make it happen once?
I don't think there is a proper function to 'disconnect it
Never mind, I found out how now.
alright, I didn't finish my answer. You could always use a denounce variable tho. if needed
Oh, okay thanks