How do I insert this script into this script to make it work??

function onEquippedLocal(mouse)

into...

player = game.Players.LocalPlayer

mouse = player:GetMouse()

animation = script:WaitForChild("Animation")

enabled = true

mouse.Button1Down:connect(function() if enabled then enabled = false

	local animationTrack = player.Character.Humanoid:LoadAnimation(animation)
	animationTrack:Play()
	
	wait(3)
	enabled = true
	
	animation:Stop()
	
	

end

end)

4 comments

0

fix your code block

0

I don't know how

0

Make sure all your code is in between the ~~~ lines. Also ensure that this script is indeed in a localscript.

0
  1. You didn't set up any 'Equipped' event. 2. Please put the code w/in a code block, b/c it's hard to read & decipher your code. 3. You're not using the function at all. 4. The equipped event automatically returns the players mouse, if given an argument from a separate function.