I have a script that makes it where when you left click on a NPC or player, it will print their name. For example, if you target a NPC named "Bob", it will print "Bob." If you click on a player with the name of "targetMe123," it will print "targetMe123." The only problem is, with the current code I have, it's only working on NPCs and not players.
Here's my code that I have:
mouse.ButtonDown1:connect(function() if mouse.Target ~= nil and mouse.Target.Parent.Humanoid then local currentTarget = mouse.Target.Parent.Name print(currentTarget) end end)