Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to get a Username from a TextButton in a SurfaceGui?

Asked by
L43Q 48
8 years ago

Here's my situation: I have a SurfaceGui (on a Part) and a Frame inside it. There's a TextButton in the Frame.

Just wondering if it's possible to find out the Username of the player who clicked the TextButton. Is it possible to find it out using a normal Script?

1 answer

Log in to vote
0
Answered by 8 years ago

Yes. It IS possible, you can check my question and the accepted answer for more information: https://scriptinghelpers.org/questions/23710/how-do-i-acquire-someones-username-and-then-use-it-to-automatically-edit-a-text-box

But in this case:

local function Click(Player)
Print (Player.Name)
end
script.Parent.TextButton.MouseButton1Click:connect(Click)
Ad

Answer this question