The script is going disappear forever cause you are ALWAYS adding transparency:
t = script.Parent.Transparency
while true do
for i=1,10 do
t = t + 0.1
wait(1)
end
wait(1)
for i=1,10 do
t = t - 0.1
wait(1)
end
end
Protip: Instead of adding, you can make the things happen on i var, like this:
t = script.Parent.Transparency
while true do
for i = 0, 1, 0.1 do
t = i
wait(1)
end
wait(1)
for i = 1, 0, -0.1 do
t = i
wait(1)
end
end
as everyone on the comments and I said, you should give objects to the vars and changing their properties, like this:
t = script.Parent
while true do
for i = 0, 1, 0.1 do
t.Transparency = i
wait(1)
end
wait(1)
for i = 1, 0, -0.1 do
t.Transparency = i
wait(1)
end
end
2 comments
Alright thanks it worked, so do you have to change properties inside of the loop instead of defining them in the variable? Cause I can see that you changed it to where it changes the transparency inside the loop. Either way I'll accept the answer.
oh finnaly you understood!!