|
| 18 Feb 2017 04:35 PM |
while true do wait(0.01) local p = Instance.new("Part") p.Parent = game.Workspace p.Position = Vector3.new ((math.random(-500, 500)),200,(math.random(-500,500))) p.Size = Vector3.new( 3, 3, 3 ) p.BrickColor = BrickColor.new((math.random(0,255)), (math.random(0,255)),(math.random(0,255)) p.Transparency= 0 p.Reflectance= 0 p.Shape = Block p.Locked = true p.Anchored = false p.CanCollide = false p.Material = "Neon"
end
|
|
|
| Report Abuse |
|
|
|
| 18 Feb 2017 04:36 PM |
| the output window would tell you which line is causing an error |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2017 04:40 PM |
The line that positions the part is wrong as well as the line that sets a random brickcolor as its colour.
Vector3.new(math.random(1, 255), math.random(1, 255), math.random(1, 255)
BrickColor = BrickColor.Random() |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2017 04:41 PM |
| Vector3.new(math.random(1, 255, math.random(1, 255), math.random(1, 255)) * |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2017 04:45 PM |
also you should use this notation for setting enumerated values: p.Shape = Enum.PartType.Block p.Material = Enum.Material.Neon
looks more robust and less chance of making a mistake when you type |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2017 04:48 PM |
Hmm, still not working.
Nice to see a Burd here though.
|
|
|
| Report Abuse |
|
|
|
| 18 Feb 2017 04:51 PM |
| You could try using a for loop instead of a while loop. It may be crashing your game. |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2017 04:51 PM |
| I got it to spawn a single brick at a random location, at which point no more spawn. Also, ### brick always is Light ##### Grey with dimensions of 2x4x1. ### material is also Plastic, so it appears to be spawning a normal brick at a random location |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2017 04:55 PM |
| After solving that riddle it looks like ### problem is at ### part where you set ### brick's size. Try this: p.Size = Vector3.new(3,3,3) without ### spaces |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2017 04:59 PM |
@Mister_Manakin
Btw Materials can use enums and strings. |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2017 05:00 PM |
| I understand that. It's just a personal preference for using enums. |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2017 05:28 PM |
Now I'm getting: "Workspace.Script:8: unexpected symbol near '='
|
|
|
| Report Abuse |
|
|
|
| 18 Feb 2017 05:28 PM |
AYY WE DID IT ITS WORKING!
THANKS GUYS
|
|
|
| Report Abuse |
|
|
|
| 18 Feb 2017 05:30 PM |
New challenge: How would I make the bricks spin randomly as they fall?
|
|
|
| Report Abuse |
|
|
|
| 18 Feb 2017 05:43 PM |
Well, found out how! Now how do I make them fall slowly? I can make them jump up a bit before falling but I dont know how to impliment BodyVelocity
|
|
|
| Report Abuse |
|
|