Hi guys im making a tool and on my attack script this "appears Attempted to call require with invalid argument(s)."
ToolAttack
local RS = game:GetService("ReplicatedStorage")
local Event = Instance.new("RemoteEvent")
Event.Name = "ToolAttackEvent"
Event.Parent = RS
local Tools = require(RS:WaitForChild("ToolConfig", 10))
Event.OnServerEvent:Connect(function(Player,Enemy,Tool)
local Data = Tools(Tool)
if not Data then return end
local Humanoid = Enemy:FindFirstChildOfClass("Humanoid")
if not Humanoid then return end
Humanoid:TakeDamage(Data(1))
end)
My discord for any questions: Zypsoh#8546

1 comment
Is ToolConfig a module?