folder.ToolActAsync.OnServerEvent:Connect(function(p, tool)
if typeof(tool) ~= "Instance" then return end
if p and p.Character and tool:FindFirstChild("Active").Value == true and p.Character:FindFirstChild(tool) then
tool:FindFirstChild("Active").Value = false
Simple.createAttackHitboxToTool(p.Character, tool, 1.1, 15, 0.37)
delay((tool:FindFirstChild("CD").Value)-0.5, function()
tool:FindFirstChild("Active").Value = true
print("Finish")
end)
end
end)
Just because this check was added, it declared that the tool arg is a String??
You need to do tool.Name because FindFirstChild returns an instance from a name. Also it didn’t declare tool arg as a string it just said the function requires a string.
The problem lies in the third line. You are trying to use FindFirstChild with an instance as parameter, but you need to use a string. So you need to pass the tools name aka tool.Name.