Hello everyone. I need some help trying to find the player’s username through a script? I’m trying to display the players username on a BillBoard GUI when a ClickDetector is clicked. I’m not very good at scripting.
Here is my code so far:
local detector = script.Parent.ClickDetector
local username = -- How do I find this?
detector.MouseClick:Connect(function()
-- Code will go here.
end)
I am trying to display the username on the “PlayerName” TextLabel after the click detector was clicked.
Once I know how to find the username, I should be able to find the leaderstats, right?
Any help will be greatly appreciated, thanks!
(Apologise if this is all wrong.)