How would I go about unequipping a weapon after idling?

I was working on a combat system until I wanted to go for something like this…

All was swell until I the results were this…

In latent terms, the issue is that the unequipping in the middle of a combo. Considering that the following script…

MOUSE.Button1Down:Connect(function()
	--Imagine the Light Attack function is here...

	if EQUIP_VAL.Value == true then
		wait(10)
		Unequip()
		EQUIP_VAL.Value = false
	end
end)

…has the unequip subroutine inside the Button1Down function I’ve sought to do it outside but that came to no avail. I have tried using Humanoid states but the same thing happens.

Humanoid:UnequipTools()

that should work, maybe

as the other guy said you wanna use Humanoid:UnequipTools() or do it per tool with setting its parent to workspace

idling can be checked via the player.Idled event, which fires after 2 minutes of being AFK

My apologies for leaving this out but the weapon here is actually a mesh welded to the right hand.
image

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.