So I have stumbled into a problem that I cannot seem to overcome.
I need to make something happen in the PlayerGui of a player who clicks on a TextButton. I thought simply doing something like this whould suffice:
TextButton.MouseButton1Click:connect(function(player)
--stuff happens here
local scroll = player.PlayerGui.Chat --I have a GUI named 'Chat' in their PlayerGui that I created earlier.
But since this all happens inside another function, it can't reference "player" as the one who clicked for some reason. So could someone help me figure out how to reference the Player who clicks on a TextButton?
**EDIT:**Sorry, I forgot to clarify. This is running inside a normal script inside a model, not in a local script.

1 comment
I guess this is why you commented on my answer. Yes, some do not have built-in arguments. Most do though.