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

Making all parts transparent at the same time?

for a,b in pairs(Player.Character.Kagune:GetChildren()) do 
if b:IsA("Part") then

for i = 1, 10 do
b.Transparency = b.Transparency + 0.1

wait(0.1)
end
	end

It works fine however it makes the parts transparent one at a time, how do I make all the parts do this at the same time?

1 answer

✓ Accepted answer

Your loops are in the wrong order! You should first iterate through using the counter, and THEN iterate through all of the parts and set the transparency to the value generated by your counter loop.

Here is how you would do this...

for transparency = 0, 1, 0.1 do -- counter loop
	for _, child in next, Player.Character.Kagune:GetChildren() do
		if child:IsA("BasePart") then
			child.Transparency = transparency
		end
	end
	wait(0.1)
end

2 comments

0

marry me pls

0

oh and do you know what this error is: - Content failed because HTTP 400 (HTTP/1.1 400 Value does not fall within the expected range.)

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