How do i add +5 studs to every side of every single basepart of the game

im trying to make a script that will make every basepart’s, union’s and model’s side +5 studs, and also im trying to use it in console.
is there something wrong?

for i, v in pairs(game:GetDescendants()) do
    if v:IsA("Union", "Model", "BasePart")  then
        v.Size = Vector3.new(v.Size + 5, V.Size + 5, V.Size + 5)
    end
end

and here’s another script i tried doing

for i, v in pairs(game:GetDescendants()) do
    if v:IsA("Union", "Model", "BasePart")  then
        v.Size = Vector3.new(v.Size.X + 5, V.Size.Y + 5, V.Size.Z + 5)
    end
end

it doesnt give any errors and it doesnt do anything at the same time

AFAIK, you can’t stack the things like that in IsA. Consider just having it as a BasePart, as that will cover all parts in game.

Note that models aren’t a basepart, and also don’t have a size component. (They do have a ScaleTo function though, which you may be able to still do)

:IsA() only takes one argument and BasePart is every part, including unions and meshparts. The way you increase the size should work except you used a capital v here

another way to do it

v.Size += Vector3.one * 5

Vector3.one is the same as Vector3.new(1, 1, 1) and then multiply by 5 to make it Vector3.new(5, 5, 5)

i will try doing it right now i hope it works

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.