im trying to make a dungeon game and im not sure what to do, im pretty sure i have to fill in the () but im not sure with what. Can someone help me?
This is where the error is
local armor = armorModule.chooseRandomArmor() -- Error here
local cooldown = false
local attackAnimation = Instance.new("Animation")
local animationID = "rbxassetid://6505914323"
attackAnimation.Parent = game:GetService("ReplicatedStorage") -- for easy access later
attackAnimation.AnimationId = animationID
local myNPC = workspace.Mobs.NPC
local npcHumanoid = myNPC:FindFirstChildOfClass("Humanoid")
local armorModule = require(game.ServerScriptService:WaitForChild("ArmorHandler"))
script.Parent.npchum.Touched:Connect(function(hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum then
local animator = npcHumanoid:FindFirstChildOfClass("Animator") or Instance.new("Animator")
animator.Parent = npcHumanoid
if not cooldown then
cooldown = true
local animation = animator:LoadAnimation(attackAnimation)
animation:Play()
hum:TakeDamage(25)
wait(1)
cooldown = false
end
end
end)
myNPC.npchum.Died:Connect(function()
myNPC:Destroy()
local armor = armorModule.chooseRandomArmor() -- Error here
print(armor.Name.." selected")
end)