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

Change Size of Part?

Asked by 10 years ago

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

Log in to vote
1
Answered by
hudzell 238 Moderation Voter
10 years ago

You need to use Vector3.new()

script.Parent.Table.Size = Vector3.new(2, 0.4, 3)
0
Let me try fight4money -2 — 10y
0
:D It works! fight4money -2 — 10y
0
Even thought fight4moneyalt2 has negative rep he isn't suspended.So fight4moneyalt is lucky iluvmaths1123 198 — 10y
0
Thanks I had that problem too, this fixed it. :) RiskoZoSlovenska 378 — 7y
View all comments (2 more)
0
thanks a lot seikkatsu 110 — 5y
0
what happened if I change the "Vector3" into "Vector2" or "Vector1", FankWalker123 0 — 3y
Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

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

Answer this question