Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Cooldown for tool equip?

Asked by 3 years ago

How to make cooldown for tool equip? I mean, I can't interact with him in any way at all for a while, not even to equip

1 answer

Log in to vote
0
Answered by 3 years ago

There's a cooldown for tool equip, if the player equips the tool, it will automatically unequip after 1 second then they aren't able to use tool for 5 seconds.

local disableTools = character.ChildAdded:Connect(function(child)    
if child:IsA(“Tool”) then
       wait(1)
       humanoid:UnequipTools()
       game.StarterGui:SetCoreGuiEnabled(2,false)
       wait(5)
       enableTools()
    end
end)

local function enableTools()
    disableTools:Disconnect()
    game.StarterGui:SetCoreGuiEnabled(2,true)
end
Ad

Answer this question