i don't know how to make it check if the players mouse is hovering over something
local TotalToDrop = math.random(1, 10)
local OreMineTest = game.Workspace.OreMineTest
function onActivation(player)
print("Tool activated")
player:GetMouse()
if player.Mouse == OreMineTest then
local Ore = game.ReplicatedStorage.Items.TestOre:Clone()
Ore.Parent = game.Workspace.Bases:WaitForChild(player.Name)
Ore.Part.Position = player.Character.HumanoidRootPart.Position - Vector3.new(0,0,5)
end
end
local tool = script.Parent tool.Enabled = true tool.Equipped:connect(function(mouse) mouse.Move:Connect(function() if mouse.Target then print("Mouse target: "..(tostring(mouse.Target))) local humanoid = mouse.Target.Parent:FindFirstChild("Humanoid") or mouse.Target.Parent.Parent:FindFirstChild("Humanoid") if humanoid then if game:GetService("Players"):FindFirstChild(humanoid.Parent.Name) then print("A player has been found") end end end end) end)