I made a card selecting feature using the scroll wheel, but when i scroll the cards dont change size, as they should heres the script:
card.Changed:Connect(function(value)
if lastcard ~= nil then
lastcard:TweenSize(CardNotSel)
end
local CardSelected : ImageLabel = cards:GetChildren()[value]
CardSelected:TweenSize(CardSel,Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,1)
print(lastcard)
lastcard = CardSelected
end)
mouse.WheelBackward:Connect(function()
if card.Value ~= 2 then
card.Value -= 1
end
end)
mouse.WheelForward:Connect(function()
if card.Value ~= maxcards then
card.Value += 1
end
end)
heres how it works
also the value changes accordingly
Got it, I would use a for loop, for i, card in pairs(-- All cards:GetChildren()) do, then check the i value and if the i value = the card value then you tween said card.