I have an animation that is for a tool I have created, the animation functions properly and I have it working with key presses thanks to devforums, except I can't seem to understand how to get it to properly sync up with the firing of the tool, and I haven't been able to grasp the wikis. I'd appreciate any explanation of what/why to change.
I have two separate localscripts one for directing the animation, and one for the tool itself.
Animation script:
local plr = game.Players.LocalPlayer
local char = plr.Character
local animQ = Instance.new("Animation")
animQ.AnimationId = "rbxassetid://1912586107"
game:GetService("UserInputService").InputBegan:connect(function(key,typ)
if not typ then
if key.KeyCode == Enum.KeyCode.Q then
local track = char.Humanoid:LoadAnimation(animQ)
track:Play()
end
end
end)

2 comments
I appreciate the explanation very much, I really wasn't having any luck finding that I needed to change them to click.
the parameter does not matter, you just need UserInputType