The first Problem is that Moved
is not a function of the mouse, Move
is. Secondly, I don't recommend looking for the humanoid, because this could include NPCs. Check to see if Mouse.Target.Name
is able to be found in game.Players
But you can't stop there. The mouse never actually hovers over the model, it hovers over the players body parts (ex LeftArm, RightLeg) so we solve that by doing Mouse.Target.Parent.Name
Here is your finalized script.
1 | local Mouse = game.Players.LocalPlayer:GetMouse() |
3 | Mouse.Move:connect( function () |
4 | if Mouse.Target ~ = nil then |
5 | if game.Players:FindFirstChild(Mouse.Target.Parent.Name) then |
6 | print ( 'Found Player: ' ..Mouse.Target.Parent.Name) |