- When I hit someone and they are blocking, I wanna make sure they are facing me to block the hit, otherwise ill be able to hit them
EX. You’re facing me and your blocking, I M1 and you block the hit, how ever if you turn the other direction not facing me, ill still hit you
local Hitbox = workspace:GetPartBoundsInBox(hrp.CFrame * CFrame.new(0,0,-3), Vector3.new(5,5,5))
local Hit = {}
for i,v in pairs(Hitbox) do
if v.Parent:FindFirstChild(“Humanoid”) and v.Parent ~= character and not Hit[v.Parent] then
Hit[v.Parent] = true
local targ = v.Parent
if targ:GetAttribute("Parrying") == true then
print("Hi")
Parried.Parent = targ.Humanoid
Parried:Play()
task.spawn(function()
character:SetAttribute("Stunned", true)
task.wait(0.7)
character:SetAttribute("Stunned", false)
end)
game.Debris:AddItem(Parried, Parried.TimeLength)
return
elseif targ:GetAttribute("Blocking") == true then
print("Yea")
return
end
targ.Humanoid:TakeDamage(5)
Punched:Play()
game.Debris:AddItem(Punched, Punched.TimeLength)
end
end