You problem with the given code is that you have too many parameters on MouseClick. The only parameter of MouseClick is a pointer to the player who clicked. Also, the parameters of the function do not belong in the connection line, but rather in the function line.
1 | local button 1 e = game.Workspace.Button 1 e |
3 | function buttonPressed(playerWhoClicked) |
7 | button 1 e.ClickDetector.MouseClick:connect(buttonPressed) |
I'm not sure how your parameters for buttonPressed in your connection line fit into the script, so I can't really help you there unless you post more of your script.