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

Why is each parts transparency different?

so when the script runs, the character doesnt slowly fade, it instantly sets transparencies, and only seems to happen once

for i = 1,10,1 do
	print(i)
	wait(.1)
	for i, part in pairs(click.Character:GetChildren()) do
		if part:IsA("BasePart") then
			part.Transparency = i*.1
			print("part")
		elseif part:IsA("Hat") then
			part.Handle.Transparency = i*.1
			print("hat")
		end
	end	
end

1 answer

✓ Accepted answer

In your second loop that loops through all of the character's children, you redefine 'i', so when you're doing i*.1, you're setting its transparency to which order it's parented to the character -- not the initial counter you set up.

1 comment

0

Thanks! its always the little things that you keep missing and that you dont know :)

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