I am trying to make Roblox show a GUI when you click another player and it does not print my print statement
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
Mouse.Button1Down:Connect(function()
if Mouse.Target.Parent:FindFirstChild("Humanoid") then
local clickedPlayer = game.Players:GetPlayerFromCharacter(Mouse.Target.Parent)
print(Mouse.Target.Parent.Name)
end
end)

2 comments
make sure your script is enabled (it happens easily that you deactivate scripts to check something and then forget to turn them back on)
script.Disabled is false