I have put the code below the green part is the difficulty I am having. I don't really know what to do next or what I'm doing wrong. I'm trying to play an animation and then have the foot do damage.
foot = game.Players.LocalPlayer.Character.RightFoot
player = game.Players.LocalPlayer
mouse = player:GetMouse()
enabled = true
kobe = false
function KeyD(key)
if enabled then
enabled = false
key = key:lower()
local hotkey = script.bby
local char = player.Character
if key == hotkey.Value then
local roundhouseright = Instance.new("Animation")
roundhouseright.AnimationId = "http://www.roblox.com/Asset?ID=884273622"
local animtrak = char.Humanoid:LoadAnimation(roundhouseright)
animtrak:Play()
kobe = true
if kobe == true then
script.Parent.touched:connect(function(hit)
--I don't know what to do after this--
end
end
end)
end
end
wait(.75)
enabled = true
end
end
mouse.KeyDown:connect(KeyD)

2 comments
Not sure what to do for "Function Hit" I don't know what the function should do.
How when I press f it shows the animation (and you can spam it) but it doesn't do damage