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

How do I make Size of a part expand constantly while in game?

I want my part to expand using vector3 or CFrame when I play the game And I don't want to just keep pressing disable and enable script

1 answer

✓ Accepted answer

If you want to keep it going forever you can use a while true do loop as follows:

local part = script.Parent --- Change this to whatever the part is under

while true do
    part.Size = part.Size + Vector3.new(1,1,1) -- this will expand the part 1 stud on each axis every .5 seconds, change the 1's to any number you want the part to resize by.
    wait(.5) -- edit the wait to whatever
end

If you want to keep it going for a limited number of times you can use a for loop as follows:

local part = script.Parent -- Change this to whatever the part is under

for i = 1,20 do -- edit the 20 to how many times you want the following code to happen
    wait(.5) 
    part.Size = part.Size + Vector3.new(1,1,1) -- this will expand the part 1 stud on each axis 20 times every .5 seconds, change the 1's to any number you want the part to resize by.
end

Hope that helped :D

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