http://prntscr.com/mfw5y2 http://prntscr.com/mfw70i (Image of the model and zombie used)
https://gyazo.com/54280853404624398045c5bb9a0ef954 (Soldier attacking R6 NPCs) https://gyazo.com/cb150ccb99d48adc25e943d40ccd4d80 (Solider not attacking R15 NPCs)
http://prntscr.com/mfw87g I tried editing the script a bit, for the soldier to attack the UpperTorso (R15) instead of Torso (R6)
I appreciate anyones help in advance thanks!! :))
Edit:
local CanSeeTarget = StateMachine.NewCondition() CanSeeTarget.Name = "CanSeeTarget" CanSeeTarget.Evaluate = function() local humanoids = HumanoidList:GetCurrent() local soldiers = {} local enemies = {} for _, object in pairs(humanoids) do if object and object.Parent and not game.Players:GetPlayerFromCharacter(object.Parent) and object.Health > 0 and object.WalkSpeed > 0 and object.Parent:FindFirstChild("UpperTorso") then local torso = object.Parent:FindFirstChild("UpperTorso") local distance = (soldier.Torso.Position - torso.Position).magnitude if distance <= configs["AggroRange"] then if object.Parent.Name == "Soldier" then table.insert(soldiers, object.Parent) else table.insert(enemies, object.Parent) end end end end

3 comments
can you include your script at least? So we know what you're doing wrong
local CanSeeTarget = StateMachine.NewCondition() CanSeeTarget.Name = "CanSeeTarget" CanSeeTarget.Evaluate = function() local humanoids = HumanoidList:GetCurrent() local soldiers = {} local enemies = {} for _, object in pairs(humanoids) do if object and object.Parent and not game.Players:GetPlayerFromCharacter(object.Parent) and object.Health > 0 and object.WalkSpeed > 0 and objec
Hello, could you please use a code block. Go back to your edits, click that Blue LUA button then paste the script inside the 2 lines. Thanks!