This is in a normal script
Script:-
local textButton = script.Parent
textButton.MouseButton1Down:connect(function(player)
print ("I got clicked by " ..player.Name)
end)
Error:-
Workspace.Part.SurfaceGui.Frame.TextButton.Script:4: attempt to index local 'player' (a number value)
Stack Begin
Script 'Workspace.Part.SurfaceGui.Frame.TextButton.Script', Line 4
Stack End
What I am trying to do is when the text box is clicked(which is in a surfacegui) it will print that the box was clicked by the player.
Any help please? :)

1 comment
Great answer. Thanks!