So, I'm trying to tell a whole bunch of objects to enable the ParticleEmitter and instead of individually calling out each object's name, I decided to use GetChildren(). My simple script is as follows..
local Cannons = script.Parent.Parent.Parent.Parent.ConfC:GetChildren() function onClicked() for c = 1, #Cannons do Cannons[c].Con.ParticleEmitter.Enabled = true end wait(0.5) for c = 1, #Cannons do Cannons[c].Con.ParticleEmitter.Enabled = false end end script.Parent.MouseButton1Down:connect(onClicked)
My output error when I try to figure out what's going on comes out as: http://prnt.sc/b8i65e (follow the link to see the picture of my output) Here's also a picture of my explorer in-case someone spots that I did something wrong there: http://prnt.sc/b8i4st
My guess is that I'm simply forgetting to name something or that I'm using GetChildren() wrong. Can someone help solve my predicament?