Greetings, I have a UI built that works as a shop that has a couple of buttons. All of them work well besides one that simply just runs as many times as it wants. The more time I stay inside the game, the more events it will send once I click it. The other buttons have no issue and work as they should, closing the UI, and opening other tabs. This is incredibly weird and I wasn’t able to find any fix, please help!
#This is outside at the top of the script:
UpgradeButton : button_loud = button_loud {}
TextForUpgradeWeapon<localizes> : message = "FINISH WEAPON"
#This is in the function that makes the canvas:
UpgradeButton.OnClick().Subscribe(WeaponUpgradeButtonClickEvent)
UpgradeButton.SetText(TextForUpgradeWeapon)
#This is the function that triggers when the button is clicked:
WeaponUpgradeButtonClickEvent(Wdata:widget_message):void=
Print("Player Pressed UpgradeButton, Start Event") #This gets printed as many times as it wants
if(Player:=Wdata.Player, PlayerUI:=GetPlayerUI[Player], SelectedButton:=Wdata.Source):
if(Widgets:=MaybeMyUIPerPlayer[Player]?):
Print("Okay") #this too
There are no errors btw
Thank you!