# ProjectileHit

Example usage:

```lua
Events.ProjectileHit(function(event)
    -- Only continue if the projectile that hit was Whim's nature spell
    if (event.projectileType == "mage_spell_nature") then
        local blockAt = BlockService.getBlockAt(event.position)
        if (blockAt.blockType == ItemType.DIRT) then
            BlockService.placeBlock(ItemType.GRASS, event.position)
            ModelService.createModel(ModelType.DAISY, blockAt.position + Vector3.new(0,2.5,0))
        end
    end
end)
```

### Parameters

#### shooter: [Entity](https://docs.easy.gg/scripting/bedwars-scripting/objects/entity) | nil

The entity that launched the projectile (may not exist).

#### projectileType: [ProjectileType](https://docs.easy.gg/scripting/bedwars-scripting/types/projectiletype)

The type of projectile that hit.

#### position: [Vector3](https://create.roblox.com/docs/reference/engine/datatypes/Vector3)

The position that the projectile hit.

#### hitEntity:  [Entity](https://docs.easy.gg/scripting/bedwars-scripting/objects/entity) | nil

The entity that was hit by the projectile (may not exist).

#### cancelled: bool <mark style="color:yellow;">\[modifiable]</mark>

If set to true, the projectile hit will be cancelled.
