--Variables local Player = game.Players.LocalPlayer local mouse = Player:GetMouse() --Mining mouse.Button1Down(function() if mouse.Target == nil then return end if mouse.Target == 'Rock' then mouse.Target.Ore:remove() end end) mouse.Button1Down:connect()
It will not remove the ore once i click.
Fixed here is the script:
local tool = script.Parent local Player = game.Players.LocalPlayer local mouse = Player:GetMouse() tool.Equipped:connect(function() tool.Activated:connect(function(Mine) if mouse.Target == game.Workspace.Rock or game.Workspace.Rock or game.Workspace.Rock or game.Workspace.Rock or game.Workspace.Rock or game.Workspace.Rock or game.Workspace.Rock or game.Workspace.Rock or game.Workspace.Rock or game.Workspace.Rock or game.Workspace.Rock then mouse.Target.Ore:Destroy() return Mine elseif mouse.Target ~= game.Workspace.Rock then return Mine end end) end)