|
| 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 |
|
|
|
| 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 |
|
|
|
| 11 Jul 2016 09:59 PM |
| It didn't do anything. In fact it didn't even remove ore at all... |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2016 10:00 PM |
| BTW, I'm not a pro scripter, I just go from what I know... |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2016 10:05 PM |
| It removes any thing that my mouse was on... |
|
|
| Report Abuse |
|
|