# Bug + lag With Event tick and AI

**URL:** <https://forums.unrealengine.com/t/bug-lag-with-event-tick-and-ai/449495>\
**Category:** AI\
**Tags:** bug, event-tick, unreal-engine, player-start, Blueprint, question\
**Created:** [May 23, 2019, 9:30pm UTC](https://forums.unrealengine.com/t/bug-lag-with-event-tick-and-ai/449495 "2019-05-23T21:30:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Etiboogi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Etiboogi](https://forums.unrealengine.com/u/Etiboogi)\
**Post date:** [May 23, 2019, 9:30pm UTC](https://forums.unrealengine.com/t/bug-lag-with-event-tick-and-ai/449495/1 "2019-05-23T21:30:41Z")

</div>

Since i place a Player Start in my game my AI have started bug.So I decide to remove my Player Start but my AI do same thing. I think it relates to my Event tick but i do not know more.

 ![277780-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/5/4/154f509750e4ea04d372bdb0da329c823741bf01.png)

 ![277783-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/7/c/37c67feae036efed63146f8aa72a5a58b33d3de5.png)

 ![277784-3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/7/9/e79772231469ef48ff4d9d96b517f051e57520ea.png)

---

<div class="post-metadata">

**Author:** ![Etiboogi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Etiboogi](https://forums.unrealengine.com/u/Etiboogi)\
**Post date:** [May 23, 2019, 9:41pm UTC](https://forums.unrealengine.com/t/bug-lag-with-event-tick-and-ai/449495/2 "2019-05-23T21:41:04Z")

</div>

I Finally I think the problem is because of the player, I can not control it

 ![277787-bougwtfe.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/1/5/915d31ebef04341110c82b76602f1834909cba11.jpeg)

I control this thing instead of my player

---

<div class="post-metadata">

**Author:** ![BOBtheROSS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BOBtheROSS](https://forums.unrealengine.com/u/BOBtheROSS)\
**Post date:** [May 23, 2019, 9:51pm UTC](https://forums.unrealengine.com/t/bug-lag-with-event-tick-and-ai/449495/3 "2019-05-23T21:51:23Z")

</div>

Your hero variable seems to be empty becasue the cast on the event begin play failed. Judging from your second screenshot the player has no Player Character. I don’t know how but maybe your player didn’t posses any pawn.

Or your player character simply is not an instance of the class “BP\_remy”. Maybe you player is spawning itself another class as pawn to posses it (look into your game mode BP or world settings)

IN oyur Target Point Police function I don’t really understand the casting of the class to another class especially since it’s a constant you put in there (is this function unfinshed?). For the spawn you usually would just select a class you want to spawn.
