Im trying to make this script fun forever. so far this is what i tried and i doesn't work
while true do
wait(0.1) script.Parent.Transparency = 0.9 wait(0.1) script.Parent.Transparency = 0.8 wait(0.1) script.Parent.Transparency = 0.7 wait(0.1) script.Parent.Transparency = 0.6 wait(0.1) script.Parent.Transparency = 0.5 wait(0.1) script.Parent.Transparency = 0.4 wait(0.1) script.Parent.Transparency = 0.3 wait(0.1) script.Parent.Transparency = 0.2 wait(0.1) script.Parent.Transparency = 0.1 wait(0.1) script.Parent.Transparency = 1
until false
This should work, I hope.
while true do for i = 1, 0, -.1 do wait(0.1) script.Parent.Transparency = i --'i' is a changing number value end for i = 0, .1, .1 do wait(0.1) script.Parent.Transparency = i end end
You're trying to 'disappear' a block, right? The 'Until False' that you're using it's incorrect, it'll never go false. Try this instead:
while true do for i = 1, 10 do wait(0.1) script.Parent.Transparency = script.Parent.Transparency - 0.1 end end
...It should work. ;)
If you want an eisier to understand kinda one then try this
while true do if <var> == false then wait(0.1) script.Parent.Transparency = 0.9 wait(0.1) script.Parent.Transparency = 0.8 wait(0.1) script.Parent.Transparency = 0.7 wait(0.1) script.Parent.Transparency = 0.6 wait(0.1) script.Parent.Transparency = 0.7 wait(0.1) script.Parent.Transparency = 0.4 wait(0.1) script.Parent.Transparency = 0.7 wait(0.1) script.Parent.Transparency = 0.2 wait(0.1) script.Parent.Transparency = 0.7 wait(0.1) script.Parent.Transparency = 0 else return end end end
idk if this is what u want but ok...
If you want the loop to stop when the part is completely invisible then you can make a simple change to SuperAndresZ_YT's loop. Just remove the while loop and the for loop will do it's job and stop after 10 loops.
For example:
for i = 1, 10 do wait(0.1) script.Parent.Transparency = script.Parent.Transparency - 0.1 end end wait(1) script.Parent.Transparency = 1
Another way to do the same thing:
while script.Parent.Transparency > 1 do wait() script.Parent.Transparency = script.Parent.Transparency - 0.1 end wait(1) script.Parent.Transparency = 1