Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Help with a axe interacting with a tree?

Asked by 27 days ago

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?

1 answer

Log in to vote
0
Answered by 27 days ago

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)
Ad

Answer this question