local function CheckButtonClick()
local connection
for i, button in pairs(CarList) do -- Go through all the buttons and check if one has been clicked
connection = button.Activated:Connect(function()
connection:Disconnect()
print("a")
end)
end
end
Whenever the same button is pressed more than once, it prints “a” multiple times, I would think I should be disconnecting the function but I’ve no clue why it’s not working exactly.