trying to create magic datapack

My basic idea was to create a Wizard class that can do spells such as fireball or teleport. Now i am stuck with a server problem... When the player uses /trigger fireball for example, the fireball sometimes spawns in other close player, and this happens with every spell.

Continue to help post