local mouse = game.Players.LocalPlayer:GetMouse()
local p = workspace.part
local plr = "Head"
while true do
wait()
if mouse.Target == nil or mouse.Target == p then
script.Parent.Value = ""
elseif mouse.Target == plr then
script.Parent.Value = plr.Parent.Name
else
script.Parent.Value = mouse.Target.Name
end
end
Everything works except elseif mouse.Target == plr then script.Parent.Value = plr.Parent.Name
Whenever I mouse over a head the value is 'Head' and not 'Player1' (the head belongs to 'Player1')
No errors either.

1 comment
Try ((mouse.Target).Parent).Name ?