I need help! Is there any way to do this? I've tried several ways but I've failed and I need help ASAP. Btw - This is a normal script on a SurfaceGUI > TxtButton > Script
Since there's no easier way to find the player when they click on a SurfaceGui, you need a LocalScript in StarterPack or StarterGui. Here's an example:
local gui = game.Workspace.Part.SurfaceGui.TextButton gui.MouseButton1Click:connect(function() --code here end)
Just remember to put in the correct things to define "gui."