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

Change Size of Part?

I am making a 3D Printer using ROBLOX, and in it, I am changing the size using a script, this is the snippet:

script.Parent.Table.Size = "2, 0.4, 3"

When I go to Play Solo, the Output says

12:34:38.913 - Workspace.MS Printer.Script:6: bad argument #3 to 'Size' (Vector3 expected, got string)

I changed "Size" to "Vector3" but it still doesn't work. Oh, and to see the game, go here: http://web.roblox.com/Computer-Lab-place?id=182834153

2 answers

✓ Accepted answer

You need to use Vector3.new()

script.Parent.Table.Size = Vector3.new(2, 0.4, 3)

6 comments

0

Let me try

0

:D It works!

0

Even thought fight4moneyalt2 has negative rep he isn't suspended.So fight4moneyalt is lucky

0

Thanks I had that problem too, this fixed it. :)

0

thanks a lot

0

what happened if I change the "Vector3" into "Vector2" or "Vector1",

You could make it a more efficient way if you wanted too. If you are making a 3D printer.

local size = Vector3.new(2,0.4,3)

You could put any number depending on what you want. If you have to use this number again in the script and you want to change it you have to go through all the numbers. But this can change it all at once.

local size = Vector3.new(2,0.4,3
script.Parent.Table.Size = size

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