So i want it so when you click a card from a group of cards, the card will get bigger and it will be selected. But it will only do this to the first card. Why?

	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

1 comment

0

Do you mean you can only selection PersonalCards:GetChildren()[1], or you can only select one and subsequently the remaining cards are unselectable?