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

How to Resize a Brick using For Loops?

I am trying to make a block be resized using a loop, and I can't seem to get it to resize. It just stays the same size no matter what. And if you need to know, the original size is 4, 1, 4. I think I've done this correctly in the past, but now I can't get it to work. Thanks in advance!!! C:

local part = script.Parent
local origpartcframe = part.CFrame
local origpartsize = part.Size
local debounce = false

part.Touched:connect(function()
	if not debounce then
		debounce = true
		for i = 1, 20 do
			part.Size = part.Size - Vector3.new(0.2, 0, 0.2)
			part.CFrame = origpartcframe
			wait(0.1)
		end
		part.Transparency = 1
		part.Anchored = false
		wait(3)
		part.Anchored = true
		part.CFrame = origpartcframe
		part.Size = origpartsize
		for i = 1, 10 do
			part.Transparency = part.Transparency - 0.1
			wait(0.1)
		end
		debounce = false
	end
end)

1 answer

✓ Accepted answer

Turn the FormFactor of the Part to "Custom"

Since it's symmetrical by default, symmetrical prevents it from being a size with floats.

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