I made this and it doesn't work, any ideas? Its supposed to tween the button to the GUI frame that it is hovering over
script.Parent.DragStopped:connect(function()
for i, v in pairs(script.Parent.Parent.Parent:GetChildren())do
if script.Parent.Position == v.Position then
script.Parent:TweenPosition(v.Position + UDim2.new(.05, 0, .05, 0), "InOut", "Sine", .5, true)
else
script.Parent:TweenPosition(UDim2.new(.05, 0, .05, 0), "InOut", "Sine", .5, true)
script.Parent.Draggable = true
end
end
end)
script.Parent.MouseButton1Click:connect(function()
script.Parent.Draggable = true
end)
Any ideas?

1 comment
Thank you so much! :D