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

10 comments
how would i make it get the player?
I've updated it to to show that. Please see above. You would see if there is a humanoid in the parent of the target and then see if that humanoid is a player, the way i did it is by seeing if the name of parent of the humanoid exists as a player
its not working
how do i make it check to where its hovering above a certain object?
it works for me on my end. Are you putting it in a localscript inside a tool?
no i used serverscript
its working but how would i use local Ore = game.ReplicatedStorage.Items.TestOre:Clone() Ore.Parent = game.Workspace.Bases:WaitForChild(humanoid.Parent.Name) Ore.Part.Position = humanoid.Parent.Character.Torso.Position - Vector3.new(0,0,5) in it?
What are you trying to do
they click a part with their tool in their hand and i want it to take anywhere from 1-10 clicks to make it spawn the part - basically digging up an ore
Do you use discord? I can explain this easier there