Hello! So, I making a gui with buttons tab and when you click, it animates. But, somewhy, its only detecting 1 button. Even if i copy it and rename, it will still not work!
Here's my code:
for i, v in pairs((script.Parent:GetChildren())) do
print(v.Name)
if v:IsA("ImageLabel") then
v.Top.Click.MouseButton1Up:Connect(function()
v.Top:TweenPosition(UDim2.new(0, 0,0, 8),Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,0.1)
wait(0.1)
v.Top:TweenPosition(UDim2.new(0, 0,0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,0.1)
wait(0.01)
--v.Top:TweenPosition(UDim2.new(0, 0,0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,0.1)
end)()
end
end
It's not full, but hope you got my problem, and help if you can!

2 comments
Why the empty pair of parenthesis at the first end? And does it print every child's Name?
yea, and i tryed to make it with two parenthesis, and with one, nothing changes