local Prices = {
Lemonade = "100", "Lemonade"
}
function PRICECHECK(player, Price)
print("a")
for i, v in pairs(Prices) do
print(v)
if v == game.Players.LocalPlayer.Backpack.Data.CurrentItem.Value then
print(v)
return(v)
end
end
end
game.ReplicatedStorage.Buy.OnInvoke = PRICECHECK
In this script, the i, v in pairs goes through the array, I wanna return "100" and not "Lemonade". Instead it returns "Lemonade", what am I doing wrong?

2 comments
Looks fine to me, since you printed v you'll see that it's 100 and not lemonade
your issue is that Lemonade: 100 and 1: Lemonade are both key-value pairs so it'll print both 100 and lemonade