A guy on the forums gave me this script template, but he didn't add and headings so I could edit it easier (I'm a newbie at scripting). Could someone do so? Thanks!
local uis = game:GetService('UserInputService')
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:wait()
local human = char.Humanoid
local mouse = player:GetMouse()
local anim = script:WaitForChild('Animation')
uis.InputBegan:connect(function(input,event)
if event then return end
if input.KeyCode == Enum.KeyCode.Q then
local track = human:LoadAnimation(anim)
if mouse.Target then
local target = mouse.Target.Parent:FindFirstChild('Humanoid')
if target then
track:Play()
target.Humanoid:TakeDamage(10)
end
end
end
end)

1 comment
Just for future reference, '--'s are called comments.