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

Should this work? Output says "Vector3 is not a valid member"

Asked by 8 years ago
wait(3)
Instance.new("Part", game.Workspace).Anchored = true
wait(2)
Brick = game.Workspace.Part
Brick.Size.Vector3.new(6,6,6)
wait(1)
print(Brick.Size)

2 answers

Log in to vote
3
Answered by 8 years ago

Problems

  • Don't just paste up random code, that's how questions get DELETED
  • You did not set the Part's size correctly.

Properties

To set the part's size, since it is a property you need to use an equal sign to change the value.

Anchored = true
CanCollide = true
Transparency = 0.3
Size = Vector3.new(6,6,6)
CFrame = CFrame.new(10,100,0)
BrickColor = BrickColor.new("Bright red")


Final Product

wait(3)
local Brick = Instance.new("Part", game.Workspace)
Brick.Anchored = true
Brick.Size = Vector3.new(6,6,6)
wait(1)
print(Brick.Size)

What to do to help

  1. Use Code block(highlight your code and press the lua button at the top)
  2. Use "=" signs!
  3. Don't use these "`" unless you are using a 1 line code.


Hope it helps!

Ad
Log in to vote
2
Answered by
Wizzy011 245 Moderation Voter
8 years ago

To set a size, you should use = to show what you wish to change the size to. You'd write this line as Brick.Size = Vector3.new(6,6,6). This should work then.

0
Aw man... Look at the size of my answer though :\ If this gets accepted I'm going to blow up because it took awhile to write everything XCCCC EzraNehemiah_TF2 3552 — 8y
0
I'll give you a 1up :P Wizzy011 245 — 8y
0
But now I feel like I need to 1up you :P EzraNehemiah_TF2 3552 — 8y
0
666 Illuminatie confirmed! XToonLinkX123 580 — 8y

Answer this question