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

Parts will not go transparent through this loop, why?

This script does, for some odd reason, not make the parts transparent. Some it makes 0.2, some 0.1. I don't really understand.

for x=1,10 do
	for i,v in pairs(Snake:GetChildren()) do
		v.Transparency = i/10
	end
	Snake.Transparency = i/10
	wait(.1)
end

Thank you for the assistance.

1 answer

✓ Accepted answer
for x=1,10 do
	for i,v in pairs(Snake:GetChildren()) do
		v.Transparency = i/10

You named the variable x, not i. In this scenario, i is actually the current index from the Snake:GetChildren() table. That's why you get weird transparency results.

Just change i to x where you change the transparency and it should work.

Another concern I had is Snake. What object is it? Make sure it actually has a transparency property.

1 comment

0

Thanks mate.

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