Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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?

1 answer

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.