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
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
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)
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)