Set attacker after damage effect

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Broken

New Member
Jun 29, 2023
7
0
1
So I want to make the player the attacker after I used damage on another entity (for a later on damage event), and the force player to attack effect does not get me the desired result due to only attacking 1 entity.

on right click:
loop all entities in radius 5 of player:
if the loop-entity is not a player:
damage the loop-entity by 5
set attacker of last damage-event to player

Is there any way to set the attacker to the player?