Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make a transparency part?

How to simplify this?

script.Parent.Transparency = 0.1
script.Parent.Transparency = 0.2
script.Parent.Transparency = 0.3
script.Parent.Transparency = 0.4

ect..

2 answers

✓ Accepted answer

It's pretty simple!

for i = 0, 10 do
	script.Parent.Transparency = script.Parent.Transparency + 0.1
	wait()
end

1 comment

1

Thanks:3

###I'd recommend using a numeric for loop.

for i = 0, 1, .1 do -- 0 is starting, 1 is desired, .1 is increment
    script.Parent.Transparency = i
    wait()
end

This discussion is preserved as it was. New answers, comments, and votes are closed.