Im getting this error code? On hum:EquipTool() of all things - it makes no sense and its so vague - you cannot even change the value. All i found about this is it used to be a roblox bug but they said they fixed it. This is the code:
local RS = game:GetService("ReplicatedStorage")
local Module = require(script.Parent.Parent.CharSlotV2.ModuleScript)
local function loopThroughItems(plr, char, hum)
local slot = Module.GetEquippedSlot(plr)
print(slot)
for _, item in pairs(slot.Items) do
if not item.Category or not item.Equipped then continue end
if item.Category == "Weapon" then
local clone = RS.CharItems.Weapons:FindFirstChild(item.Name):Clone()
print(hum)
hum:EquipTool(clone)
end
end
end
RS.Weapons.CheckWeapon.OnServerEvent:Connect(function(plr)
local tool
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
tool = char:FindFirstChildWhichIsA("Tool")
if not tool then
loopThroughItems(plr, char, hum)
else
hum:UnequipTools(tool)
end
end)