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

why is my part growing way to much?

i tried to make a part grow with a for loop but somethin is wrong

	for i = 1,10,0.1 do
		wait()
		part.Size = part.Size + Vector3.new(0,i,0)
		
	end

but this happens Link!

1 answer

The reason for this is that when you change i, the rate at which the part grows also changes, this means near the end of the loop, the part would be increasing by 9.x studs per iteration, to prevent this, you could do:

local size_inc = 1--size increment
for i = 1,10, 0.1 do
	part.Size = part.Size + Vector3.new(0,size_inc,0)
	wait()
end

This would hold the size increment at a constant.

Hopefully this helped!

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