of     1   

Pineappli
#33183715Saturday, September 04, 2010 7:00 PM GMT

for i=1,100 do local B=Instance.new("Part") B.Parent=Workspace B.Size=Vector3.new((math.random(20, 100)),(math.random(20, 100)),(math.random(20, 100))) B.CFrame = B.CFrame * CFrame.fromEulerAnglesXYZ((math.random(0, 1)),(math.random(0, 1)),(math.random(0, 1))) B.CFrame = Vector3.new(math.random(-250, 250),0,math.random(-250, 250)) B.Anchored=true end Workspace.Script:7: bad argument #3 to '?' (CFrame expected, got userdata) It should create 100 parts, each a random size, each a random CFrame, each a random position at baseplate level. Yet it comes up with that error.
Fungalmungal
#33183809Saturday, September 04, 2010 7:01 PM GMT

You can't set a CFRame to a Vector3. Get rid of the third-to-last line.
[rfa#hidefromsearch]
#33183836Saturday, September 04, 2010 7:01 PM GMT

[rfa#hidefromsearch]
PyroCity
#33183875Saturday, September 04, 2010 7:02 PM GMT

B.CFrame = CFrame.new(math.random(-250, 250),0,math.random(-250, 250)) It should be that.
Fungalmungal
#33183971Saturday, September 04, 2010 7:03 PM GMT

Both of those lines would do the same thing.
Pineappli
#33184003Saturday, September 04, 2010 7:03 PM GMT

It used to. Because isn't: B.CFrame=B.CFrame+Vector3.new(0,0.1,0) just B with 0.1 added to the y axis? So shouldn't something like: B.CFrame=Vector3.new(0,0.1,0) work, as it is setting it to the position?
Pineappli
#33184093Saturday, September 04, 2010 7:04 PM GMT

Late post, thanks for helping.
PyroCity
#33184098Saturday, September 04, 2010 7:04 PM GMT

No. When setting an exact CFrame, use CFrame.new
Fungalmungal
#33184110Saturday, September 04, 2010 7:04 PM GMT

No. CFrames and vectors are completely different. You can't set a CFrame to a vector. A CFrame plus a vector is another CFrame, though.
Pineappli
#33184520Saturday, September 04, 2010 7:10 PM GMT

Ah, I always used to think it was Vector3.new when positioning it.
Taboo206
#33186123Saturday, September 04, 2010 7:28 PM GMT

ACTUALLY, you can CFrame=CFrame.new(Vector3.new(1,1,1)) im pretty sure that sets it to that position through CFrame.
sncplay42
#33187071Saturday, September 04, 2010 7:39 PM GMT

B.Position = Vector3.new(math.random(-250, 250),0,math.random(-250, 250)) Otherwise the previous setting of CFrame will lose its effect.

    of     1