How To Make An Axe?

Hello! I’m making a Bendy And The Ink Machine Fangame. And I Wanna Make The Axe. How Do I Do That? I Want A Specific Board To Break If The Player Is Holding The Axe And Clicks On The Board And It Doesn’t Work If You Just Touch The Board With The Axe Without Clicking. How Do I Make This?

EDIT :
Heres the script. I have no idea where to start.

–// Variables //–

– Other
local Tool = script.Parent
local Animation = Tool.Swing
local Cooldown = 0.8
local debounce = false

–Damge
local Handle = script.Parent.Handle
local PlayersHit = {}

– Plank
local Plank = workspace.BreakablePlank
local LeftPlank = Plank.LeftPlank
local RightPlank = Plank.RightPlank

–// Script //–

Tool.Activated:Connect(function()
if debounce then return end
debounce = true

– Play Animation

local Character = Tool.Parent
local Humanoid = Character.Humanoid

local AnimationTrack = Humanoid:LoadAnimation(Animation)

AnimationTrack:Play()
Tool.SwingSound:Play()

– Do Damage

Handle.Touched:Connect(function(Hit)
if Hit.Parent:FindFirstChild(“Humanoid”) and Hit.Parent ~= Tool.Parent then

  	if debounce == true and PlayersHit[Hit.Parent] == nil then
  		Hit.Parent:FindFirstChild("Humanoid"):TakeDamage(50)
  		PlayersHit[Hit.Parent] = true
  		wait(Cooldown)
  		PlayersHit[Hit.Parent] = nil
  	end
  	
  end

end)

– Cut Down Planks

wait(Cooldown)
debounce = false
end)

can you show us the script you made?

You can Usually cast a Ray to detect Certain Objects, You can make it so:

If it hits a Humanoid
-10 Damage

If it hits an item with a specified Name
Destroyed


@CaptainTeemukas Make Sure you Follow these rules on Scripting Support:

Please do not ask people to write entire scripts or design entire systems for you. If you can't answer the three questions above, you should probably pick a different category.

1 Like