Problem
You can only use two arguments in Instance.new()
. The object you want to create, and the parent of the new object.
You're also using Smoke Color improperly as it is a Color3 value, not a BrickColor (even if it was you'd need to use BrickColor.new()
)
Solution
Since it looks like you're wanting to make multiple of the same parts, what you could do is put all the parts you defined into a table. Then you would be able to use a for loop to go through all elements of the table and create the new items.
You would need to use Color3.new(r/255, g/255, b/255) since all arguments of Color3.new()
are floats they have to be between 0 and 1. Alternatively, you can use the new function Color3.fromRGB
and use whole numbers from there.
Final Script
01 | local PartsToSetAblaze = { |
02 | script.Parent.Parent.FireB, |
03 | script.Parent.Parent.FireC, |
04 | script.Parent.Parent.FireD, |
05 | script.Parent.Parent.FireE, |
06 | script.Parent.Parent.FireF, |
07 | script.Parent.Parent.FireG, |
08 | script.Parent.Parent.FireH, |
14 | for Index, Value in pairs (PartsToSetAblaze) do |
16 | local fir = Instance.new( "Fire" ,Value) |
18 | local smo = Instance.new( "Smoke" ,Value) |
20 | smo.Color = Color 3. new( 255 / 255 , 255 / 255 , 255 / 255 ) |
26 | script.Parent.Touched:connect(onClicked) |
Hopefully this answered your question. If it did, do not forget to hit the accept answer button. If you have any questions, feel free to comment below and I will get back to you.