Can i make so players can't unequip tool while touching brick?

Hi, im making a script that detects if player has a tool equipped and if player touched brick, but when player unequip tool script stop working so is there way i can make so players can’t unequip tool?

My english bad so im sorry for mistakes

1 Like

there’s more than one way, but you could try this option:
Whenever the player unequips the tool, it gets auto equipped.

for instance you could use this local script in the tool,

You can detect when a player unequips a tool like this :

    tool.Unequipped:Connect(function()
         print(tool.Name.."unequipped")
    end)

Now to re-equip once unequipped,
  local tool = script.Parent
  local player = game:GetService("Players").LocalPlayer

  local Character = Player.Character or Player.CharacterAdded:Wait()
  local Hum = Character:WaitForChild("Humanoid") 

  tool.Unequipped:Connect(function()
  -- a RunService.Wait()  possibly
       wait() -- 0.03 
      Character.Humanoid:EquipTool(tool)
  end)
5 Likes