Set a target to follow||doc135577

September 20, 2022

Format

 AIControl:setFollowTarget(entity)
  • The class to which the function belongs:AIControl

Description

Sets the AI's follow target entity.


Parameters

Parameters type Description
entity Entity entity

Code Samples

local player
local petEntity
local control = petEntity:getAIControl()
control:setFollowTarget(player)