of     1   

John1626
#702800Friday, April 04, 2008 12:06 AM GMT

Im making a Factory, but I need a certain script edited. Here is the script: function onTouched(NewBrick) --NewBrick is the brick's name local f = math.random(1,3) if f == 1 then NewBrick.Shape = Ball end if f == 2 then NewBrick.Shape = Cylinder end if f == 3 then NewBrick.Shape = Block end end script.parent.Touched:connect(onTouched) Please revise it! ( The connection line works with all my other scripts that follow the same format of NewBrick and math.random( , ) )
ultrameep
#702906Friday, April 04, 2008 12:16 AM GMT

function onTouched(NewBrick) --NewBrick is the brick's name local f = math.random(0,2) NewBrick.Shape = f end script.Parent.Touched:connect(onTouched)
lavamaster
#702931Friday, April 04, 2008 12:18 AM GMT

f = math.randon(1,3) function onTouched(NewBrick) --NewBrick is the brick's name if f == 1 then NewBrick.Shape = 1 end if f == 2 then NewBrick.Shape = 2 end if f == 3 then NewBrick.Shape = 3 end connection = Script.Parent.Touched:connect(onTouched)
Neardanger
#703029Friday, April 04, 2008 12:29 AM GMT

f = math.randon(1,3) function onTouched(NewBrick) --NewBrick is the brick's name if f == 1 then NewBrick.Shape = 1 end if f == 2 then NewBrick.Shape = 2 end if f == 3 then NewBrick.Shape = 3 end connection = Script.Parent.Touched:connect(onTouched) end
John1626
#703637Friday, April 04, 2008 1:24 AM GMT

All yours were wrong. I had to figure it out on my own, and here is the working version: function onTouched(NewBrick) --NewBrick is the brick's name f = math.random(1,3) if f == 1 then NewBrick.Shape = "Ball" end if f == 2 then NewBrick.Shape = "Block" end if f == 3 then NewBrick.Shape = "Cylinder" end end script.parent.Touched:connect(onTouched)

    of     1