For the past one or two months I’ve been trying to make a system so that the player can block and parry NPC enemies attacks. I’ve tried many different things but just cant get it work. Does anyone have scripts or models or anything that could achieve this.
hello, you could insert IntValue inside every player named like “block” or something, when player presses lets say F, intvalue value could be set to 2 and after like .3 seconds you can set it to 1 and if player releases F it would go to 0. So when npc attacks player, script could check value of Intvalue and do something like
if Block.Value == 2 then
-- dont take damage
elseif Block.Value == 1 then
BlockDurability.Value -= 10
else
Humanoid.Health -= 10
end
Have the player touch a hotkey that fires a remote event, the remote event saves the tick()
When you’re gonna damage the player get that saved tick, if tick()-guardTick<0.5 then Parry() and then for the guard if tick()-guardTick>0.5 and tick()-guardTick<2 then block()
The block and parry functions are just examples, you’d do then and write what you want to happen there