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

Size of a part not changing?

Asked by 4 years ago
Edited by youtubemasterWOW 4 years ago

When I try to change the size of a part it won't change, even with Vector3. Here's the code:

local part = script.Parent

if true then
    part.Size = Vector3.new(part.Size.X(9),part.size.Y(1),part.size.Z(1))
end
0
Just add the numbers without adding “Part.size.X,Y,Z”. It works like that eyad27 8 — 4y

1 answer

Log in to vote
3
Answered by 4 years ago

Howdy!

That's not really how to set a Vector3 value. According to the Roblox Documentation on Vector3 Values, all you need to define is the X, Y, and Z value to set it to. You don't need to set where it goes to, as it is predefined by a format.

For example, if you wanted to change the size of a part in the workspace, you would use what I have below.

local part = workspace.Part
part.Size = Vector3.new(5, 20, 100)

If this helped you out, consider accepting this answer for those sweet, sweet reputation points. If not, comment below and I (or someone else) will help you out.

Be sure to check out the Roblox API Documentation as well for additional reference.

Ad

Answer this question