Here is a simple excerpt from a Local Script in the starter pack.
function KeyPress(PressedKey)
local key = string.lower(PressedKey)
--if key:byte() == 9 then ----------------------------PARRY ANIMATION/CODE
if key == "r" then
local hum = script.Parent.Parent.Character:FindFirstChild("Humanoid")
local occ = script.Parent.Parent.Character:findFirstChild("Torso"):findFirstChild("isOccupied")
if occ.Value == false then
occ.Value = true
local anim = Instance.new("Animation")
--anim.AnimationId ="http://www.roblox.com/Asset?ID=27762691"
anim.AnimationId = "http://www.roblox.com/asset/?id=27762691"
local anime = hum:LoadAnimation(anim)
anime:Play()
wait(2)
anime:Stop()
anime:remove()
wait(.3)
occ.Value = false
end
end
