Me and the AI Can't damage each other.

Hello
I was taking online course in UDEMY and I had a problem but the instructor is not responding so I hope you guys can help me.
Me and the AI Can’t damage each other.
I succeeded making the AI chase me and perform attack animation but I couldn’t understand where is the problem why can’t do or take damage.

This is the - AI controller

And this - On Hit (Main weapon Collision Component)

First step

Can Receive Damage → Branch [False] → Print string

Second Step
Apply Damage must be on the server.

Thank you for reply

I changed the branch to false only the AI start do damage to me, and when i die am receiving error


Blueprint Runtime Error: “Accessed None trying to read property CallFunc_GetItemMesh_ItemSkeletalMesh”. Node: Set Simulate Physics Graph: EventGraph Function: Execute Ubergraph BP Base Weapen Blueprint: BP_BaseWeapen

Blueprint Runtime Error: “Accessed None trying to read property CallFunc_GetItemMesh_ItemSkeletalMesh”. Node: Set Collision Profile Name Graph: EventGraph Function: Execute Ubergraph BP Base Weapen Blueprint: BP_BaseWeapen

Second Step you meant in the second image?

You need to verify that each character “can receive damage”. The point of the print string is to help debug.

On Hit → Can Receive Damage → Print a yes or no to screen.
If No, troubleshoot why they cannot receive damage.

Second step meaning the next thing you need to do.

Apply Damage is a server side only function. Thus it must be run on the server. If you are running the “On Hit” on the autonomous proxy you cannot call “Apply Damage” directly.

You need to create a server event (RPC, run on server) that executes the apply damage function.

1 Like

Everything working thank you