What do you want to achieve? Press player’s character to get there username.
What is the issue? Pressing the character but can not change the text.
What solutions have you tried so far? Yes but no solutions found.
local player = game.Players.LocalPlayer local button = script.Parent.TextButton local Username_Frame = script.Parent.AssignFrame.Username local PlayerUsername = player.Name local mouse = player:GetMouse() mouse.Button1Down:Connect(function() local target = mouse.Target if target.Parent:FindFirstChild("Humanoid") and target.Parent ~= game.Workspace then Username_Frame.Text = player.Name end end)