01 | function PartGenerator(Name, Color, Material, Position) |
02 | local Part = Instance.new( "Part" ) |
03 | Part.Name = Name |
04 | Part.Parent = workspace |
05 | Part.BrickColor = Color |
06 | Part.Material = Material |
07 | Part.Position = position |
08 | Part.Reflectance = 1 |
09 | Part.Anchored = true |
10 | Part.CanCollide = true |
11 | end |
12 |
13 | PartGenerator(Part 1 , BrickColor.new( "Really red" ),Enum.Material.Asphalt, Vector 3. new( 0 , 15 , 0 )) |
14 | PartGenerator(Part 2 , BrickColor.new( "Really blue" ), Enum.Material.CrackedLava, Vector 3. new( 0 , 20 , 0 )) |
Hey there! I think you might have forgotten to make the name a string.
Line 13:
1 | PartGenerator( "Part1" , BrickColor.new( "Really red" ),Enum.Material.Asphalt, Vector 3. new( 0 , 15 , 0 )) |
Line 14:
1 | PartGenerator( "Part2" , BrickColor.new( "Really blue" ), Enum.Material.CrackedLava, Vector 3. new( 0 , 20 , 0 )) |
If this still doesn't work, please comment what errors the output is printing. :D