So, I finally fished my script. Its a script that when you click a ''tree" its going to harvest that tree.

The problem is currently i'm using a clickdetector that when i hold the tool i cant click anymore.

Here is the script:

local click = script.Parent:WaitForChild("ClickDetector")

    click.MouseClick:Connect (function(player)
if player.Character:FindFirstChild("Stone") then

--everything in here isnt important :p

end
end)

7 comments

0

I have seen that page, But what do i need to put in the script of the tool?

0

I think that instead of a click detector, you should just get the position of the mouse, see if it is on the tree, check the distance of the player from the tree using .Magnitude, and do your code if all those are within permissible bounds.

0

When the player clicks, that is.

0

Where do i need to put the code for like unanchoring of the parts ect?

0

Click? not possible.