Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to Resize a Brick using For Loops?

Asked by
yelsew 205 Moderation Voter
9 years ago

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:

01local part = script.Parent
02local origpartcframe = part.CFrame
03local origpartsize = part.Size
04local debounce = false
05 
06part.Touched:connect(function()
07    if not debounce then
08        debounce = true
09        for i = 1, 20 do
10            part.Size = part.Size - Vector3.new(0.2, 0, 0.2)
11            part.CFrame = origpartcframe
12            wait(0.1)
13        end
14        part.Transparency = 1
15        part.Anchored = false
View all 26 lines...

1 answer

Log in to vote
2
Answered by 9 years ago

Turn the FormFactor of the Part to "Custom"

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

Ad

Answer this question