So i’ve been trying to make these particles disabled from code but for some reason they don’t.
for i, v in pairs(Boombox:GetChildren()) do
if v:isA('ParticleEmitter') then
if TextureID == Textures.Winter then
if v.Name == 'Winter_Effects' then
v.Enabled = true
else
v.Enabled = false
end
end
if TextureID == Textures.Valentines then
if v.Name == 'Valentines_Effects' then
v.Enabled = true
else
v.Enabled = false
end
end
if TextureID == Textures.Hallowen then
if v.Name == 'Hallowen_Effects' then
v.Enabled = true
else
v.Enabled = false
end
end
if TextureID == Textures.Normal then
v.Enabled = false
end
end
end
for i, v in pairs(Template_Holder:GetChildren()) do
if v:isA('Frame') then
if v.Name ~= 'NormalBoombox' then
for i, v in pairs(v:GetChildren()) do
if v:isA('TextButton') then
v.MouseButton1Click:Connect(function()
ChageSkin:FireServer(v.Parent.BoomboxTexture.Value, v.Parent.GamepassID.Value)
end)
end
end
end
end
end
Does v.Parent.BoomboxTexture.Value include rbxassetid:// or just the number? If it’s just the number it could mean the iif statement never fires which would cause it not to stop.
You could try putting the if statement for normal at the top, or changing all the ifs to be an elseif from the first if. So it continues down the chain, rathe than going to another if statment than another.