Im trying to make it so you can select a card from a group of cards and it makes it bigger. But right now its only letting me select the first card only. Why is this?
for i, card in pairs(parent:WaitForChild("PersonalCards"):GetChildren()) do -- Card Click function
card.MouseButton1Click:connect(function()
CardSelected = true
CurrentCard = card
print("1 "..CurrentCard.Name)
if LastCard ~= CurrentCard or nil then
if LastCard ~= nil then
LastCard:TweenSizeAndPosition(UDim2.new(LastCard.Size.X.Scale-.01,0,LastCard.Size.Y.Scale-.01,0),UDim2.new(LastCard.Position.X.Scale+.005,0,LastCard.Position.Y.Scale+.005,0),"InOut","Linear",.1,true)
end
card:TweenSizeAndPosition(UDim2.new(card.Size.X.Scale+.01,0,card.Size.Y.Scale+.01,0),UDim2.new(card.Position.X.Scale-.005,0,card.Position.Y.Scale-.005,0),"InOut","Linear",.1,true)
LastCard = card
print("2 "..CurrentCard.Name)
end
end)
end
