Code:
on rightclick:
loop all entities in world of player:
if the distance between the player and entity is smaller than 5:
if the entity is not player:
apply slowness 5 to the entity for 10 seconds
[doublepost=1592811788,1592808366][/doublepost]
Ok, so i replaced entity with loop-entity and everything started working.Ok, so there's a few weird problems. When I right click, only one entity gets slowness. The entity that gets slowness is the one, I am looking at. If I am not looking at an entity, nothing happens(I am holding an item when I do this). Also slowness 5 is given to it for an infinite amount time.Code:on rightclick: loop all entities in world of player: if the distance between the player and entity is smaller than 5: if the entity is not player: apply slowness 5 to the entity for 10 seconds