the LocalScript is in starter player scripts
local rep = game.ReplicatedStorage
local mouseDetection = rep.MouseDetection
local UIS = game:GetService("UserInputService")
local delayed = false
local delayTime = 0
local equipped = false
local tool = game.StarterPack.Katana
tool.Equipped:Connect(function()
equipped = true
end)
tool.Unequipped:Connect(function()
equipped = false
end)
UIS.InputBegan:Connect(function(input)
if delayed == false then
if equipped == true and input.UserInputType == Enum.UserInputType.MouseButton1 then
delayed = true
mouseDetection:FireServer()
if delayed == true then
task.wait(delayTime)
delayed = false
end
end
end
end)
while true do
wait(2)
print(delayed)
end

1 comment
Ping, I replied