So im making a kick function. But in this its seems very unresponsive to being touched by the front or back of a character. Sometimes it will hardly work on the sides of the character. Why is that?
UIS.InputBegan:connect(function(input, GameProcessed)
if input.KeyCode == Enum.KeyCode.Q then
if deb == false then
deb = true
local kickanim = Instance.new("Animation")
kickanim.AnimationId = "http://www.roblox.com/Asset?ID=453390385"
local animTrack = char.Humanoid:LoadAnimation(kickanim)
animTrack:Play()
char.Humanoid.WalkSpeed = 0
local tick1 = tick()
local deb2 = false
char:FindFirstChild("Right Leg").Touched:connect(function(hit)
if deb2 == false then
deb2 = true
if char.Humanoid.Health > 0 and hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid:TakeDamage(10)
end
end
end)
wait(.7)
char.Humanoid.WalkSpeed = 23
deb = false
end
end
