How do I know what player is clicking a surfacegui ImageButton? I’m trying to make an ordering system in which only the user who is signed into the register is able to place an order with the same register.
How can I detect what player is clicking the ImageButton? I am aware that SurfaceGui doesn’t support local scripts.
Just like others said, you could use a ClickDetector to fire a RemoteEvent, but as you mentionned that you want to do it with an ImageButton, I optted for this option.
Well you do :FireServer with the remote event when the button is clicked, and then on the server, you will have to do a .OnServerEvent. The first argument of the .OnServerEvent is the player who clicked the button in this case.