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!
You are trying to call an rbxscriptconnection Try changing line 10 to just
end)
Your code looks like it's trying to hide your frames, as your tween is 0.1 seconds long and moves it to 0,0,0. Use
v.Visible = false
rather than that massive block.