I’m making a menu for my game
and I wanted to add a cool glitch effect using particle emitters
I wanted to enable them at once after a event so I used for in do
here is my script:
for i,v in pairs(part:GetDescendants()) do
if v:IsA("ParticleEmitter") then
anim:Play() --a tween animation
wait(8)
textlabel.Visible = false -- text
smile.Visible = true -- text
blue.Visible = true -- chromatic aberration effect
red.Visible = true -- chromatic aberration effect
blue:TweenPosition(UDim2.new(.51,0,.5,0),Enum.EasingDirection.Out,Enum.EasingStyle.Linear,1)
red:TweenPosition(UDim2.new(.49,0,.5,0),Enum.EasingDirection.Out,Enum.EasingStyle.Linear,1)
v.Enabled = true -- particle effect
wait(100) -- set to 100 cuz test
v.Enabled = false
smile.Visible = false
blue.Visible = false
red.Visible = false
end
end
I did try to search some solution but they’re the same thanks in advance
for i,v in pairs(part:GetChildren()) do
if v:IsA("Attachment") then
local Attachment = v
for I,V in pairs(Attachment:GetChildren()) do
if V:IsA("ParticleEmitter") then
anim:Play() --a tween animation
wait(8)
textlabel.Visible = false -- text
smile.Visible = true -- text
blue.Visible = true -- chromatic aberration effect
red.Visible = true -- chromatic aberration effect
blue:TweenPosition(UDim2.new(.51,0,.5,0),Enum.EasingDirection.Out,Enum.EasingStyle.Linear,1)
red:TweenPosition(UDim2.new(.49,0,.5,0),Enum.EasingDirection.Out,Enum.EasingStyle.Linear,1)
V.Enabled = true -- particle effect
wait(100) -- set to 100 cuz test
V.Enabled = false
smile.Visible = false
blue.Visible = false
red.Visible = false
end
end
end
end