Help with making a block breaker attack

Hello fellow developers ! I have prepared a shield tool for my game which will block any incoming attacks to the player but the problem is that the players will then just keep the shield equipped so I have decided to make a shield breaker attack which will when hit the humanoid make the player unequal the shield and stun then for 3 seconds but I don’t know how to do that. I have made the stun part as well as the animations but I don’t know how to make the player unequal the shield so I would really appreciate any help I receive for that purpose. I am using R15 avatar type and if the code explaining how the shield is working is required then here it is.

local charhum = character:FindFirstChildOfClass("Humanoid")
			local rootpart = character.HumanoidRootPart
			local lasthp = charhum.Health

			connection = charhum.HealthChanged:Connect(function(hp)
				if character then

					if hp < lasthp then
						charhum.Health = lasthp
						rootpart.Velocity =

By “unequal” do you mean by “equip”? If yes then,

If you want the block breaker attack only work on players with the shield equipped, what you wanna do is check the player’s character for a tool named “Shield” or whatever you called your shield. If the shield exists, put a line in your code “Humanoid:UnequipTools()” since you want the player to unequip the shield once they got hit.

Just simply add “Humanoid:UnequipTools()” to make the player unequip any tools.

1 Like

Thank you and yes by ‘unequal’ I mean ‘unequip’ :laughing:

1 Like