Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Getting children from the tool of another player during .Touched event?

Asked by 4 years ago

Hello. I am trying to make a blocking action for my sword, where if you hit the other player's weapon while a boolvalue is active then their swing is blocked. It will work on an NPC but not when I test it with other players. Is there something else I need to do if it is the tool of another player?

Tool.Hitbox.Touched:Connect(function(part)
local anim = script.Parent.Parent.Humanoid:LoadAnimation(Tool.Animations.Parried)

    if Damage and part.Name == "Hitbox" and part.Parent.Hitbox.Blocking.Value then
    Blocked = true
    Damage = false
    anim:Play()
    wait(1)
    Blocked = false
    Damage = true
end 
end)

Answer this question