Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to detect when player mouse hovers over a model/part while holding a tool?

When player mouse hovers over a model/part the part inside the model appears without holding a tool, when player equips a tool and hover their mouse over a model/part the part inside the model wont appear. How do I fix this?

2 answers

✓ Accepted answer

Try using Mouse.Target it detects any part that mouse is pointing at. For more information, check out the documentation of Mouse and Mouse.Target

Tool.Equipped:Connect(function(Mouse)
   local Target = Mouse.Target
   
   if Target then
      -- your code stuff here
   end
end)

hey you! have you ever heard of enes? if you are in trouble, better call enes!

This discussion is preserved as it was. New answers, comments, and votes are closed.