a good idea to use everytime a player performs an attack, and enabling it again when the attack is finished? Does that also prevent them from unequipping?
Then you can check constantly whether the tool has been reparented (character.ChildRemoved and check whether the returned instance is the tool), and if it was, just equip it again using Humanoid:EquipTool().
The only way i could think of doing it is whenever player unequipps a tool you would force equip it.
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild('Humanoid')
script.Parent.Unequipped:Connect(function()
task.wait(0.01)
Humanoid:EquipTool(script.Parent)
end)
Well, there is an approach that is going to be extremely annoying to say but making a custom Backpack. You can find more creative methods to overcome this individual problem, but if your game will further have to disable more core mechanics with the core Backpack, I would suggest scripting a custom one, as that will save you a lot of headache.