Hey! My aim of this script is to get the TextLabel to show the name of what part the player has clicked on. This works for all parts, except from characters, which is crucial to this feature of the game. However, for some reason, when the mouse is clicked, it doesn’t register that it’s clicked a part.
local LocalPlayer = game.Players.LocalPlayer local UserInputService = game:GetService("UserInputService") local Mouse = LocalPlayer:GetMouse() Mouse.Button1Down:Connect(function() local Target = Mouse.Target if Target then LocalPlayer.PlayerGui.EnliteUI.TextLabel.Text = Target.Name end end)
If anyone has any solutions, please let me know! Thank you.