So I've been trying for a few days to make trees in my survival game able to be chopped down, but I haven't gotten any luck. I've also been using free realistic models for trees because I don't know the first thing about modeling. I've been using this local script in StarterCharacterScripts and I don't really know what to do at this point. I also want to make sure that when any tree is chopped, after about like 0.5 seconds, the tree disappears and is completely untouchable, which I can't really do if the tree can't fall in the first place. Thank you to anyone who might be reading this.
local player = game.Players.LocalPlayer local mouse = player:GetMouse() local camera = workspace.CurrentCamera local RunService = game:GetService("RunService") local target local down local WalkKey = "MouseButton1Click" local PlayerModel = workspace:WaitForChild(player.Name,1)
game:GetService("UserInputService").InputBegan:Connect(function(inputObject, gameProcessedEvent) if inputObject.KeyCode == Enum.KeyCode[WalkKey] then if mouse.Target.Name == "Trunk" then
if PlayerModel.Hatchet then mouse.Target.Weld:Destroy() mouse.Target.Name = "Welded" if mouse.Target ~= nil and mouse.Target.Locked == false then -- extra end end end end
end)