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

Is there any way to make this more efficient?

I've rewritten this a few times to get it as efficient as possible and I hope there is a more efficient way to do this. So I have two models in workspace and I'm trying to smoothly make all the parts in those two models disappear at the same time. It works, it's just sorta laggy. If i were to add up all of the parts in these two models the sum would probably be around 400 something parts

for i = .5,1.1,.02 do
	RenderStepped:wait()
	for index,v in pairs(childA) do
		v.Transparency = i
	end
	for index,v in pairs(childC) do
		v.Transparency = i
	end
end
modelA:Destroy()
modelC:Destroy()

1 answer

You could replace RenderStepped:wait() with simply just wait().

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