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( , ) ) |