generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Help with my PickAxe removing ore script.

Previous Thread :: Next Thread 
TypxcalSavage is not online. TypxcalSavage
Joined: 21 Jan 2013
Total Posts: 62
11 Jul 2016 09:51 PM
So, this script removes the ore. But I want it to remove the ore IF I am clicking the Thing the Ore is on. What happens is it removes the ore if I click anywhere...

Script:

--Variables
local Player = game.Players.LocalPlayer
local mouse = Player:GetMouse()

--Mining
function MineOre()
if mouse.Target ~= game.Workspace["RockW/Ore"] then
game.Workspace["RockW/Ore"].Ore:remove()
print("Removing Ore from " ..mouse.Target.Name)
if mouse.Target <= game.Workspace["RockW/Ore"] then
local NoOreFound = game.Workspace["RockW/Ore"].Ore:Clone()
NoOreFound.Parent = game.Workspace["RockW/Ore"]
end
end
end


mouse.Button1Down:connect(MineOre)
Report Abuse
GraphicsSettings is not online. GraphicsSettings
Joined: 12 Sep 2013
Total Posts: 2883
11 Jul 2016 09:57 PM
if mouse.Target ~= nil and mouse.Target.Name == ("RockW/Ore") then
mouse.Target:Destroy()
print("Removing Ore from " ..mouse.Target.Name)
Report Abuse
TypxcalSavage is not online. TypxcalSavage
Joined: 21 Jan 2013
Total Posts: 62
11 Jul 2016 09:59 PM
It didn't do anything. In fact it didn't even remove ore at all...
Report Abuse
TypxcalSavage is not online. TypxcalSavage
Joined: 21 Jan 2013
Total Posts: 62
11 Jul 2016 10:00 PM
BTW, I'm not a pro scripter, I just go from what I know...
Report Abuse
TypxcalSavage is not online. TypxcalSavage
Joined: 21 Jan 2013
Total Posts: 62
11 Jul 2016 10:05 PM
It removes any thing that my mouse was on...
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image