Still have questions? Join our Discord server and get real time help.
0

# Help with a axe interacting with a tree?

So I am pretty new to scripting but I understand some of the basics and I was hoping to make an axe that when you swing it starts to chop down a tree but I'm not sure what I would use to have that axe interact with the tree? Someone help please?

0

if you are new to scripting, you probably shouldn't be doing stuff like this. However if you still want to do something like this I would recommend using something like this :

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local Tree = workspace.Baseplate --path to tree here

mouse.Button1Down:Connect(function()
if mouse.Target == Tree then
if player.Character:FindFirstChild("Axe") then
--interact script here
end
end
end)