Skip to content

Source

A bullet source, used to create bullets.

Properties

id

luau
Source.id: string

The source's unique ID (generated with HttpService:GenerateGUID(false)).

Methods

getBullets

luau
Source:getBullets() -> SharedTable<number, Bullet>

Returns a SharedTable with Bullet IDs as keys and Bullets as values.

findBulletFromId

luau
Source:findBulletFromId(bulletId: number) -> Bullet?

Returns a bullet from the source with the given bullet id, or nil.

makeBullet

luau
Source:makeBullet(origin: Vector3, direction: Vector3, information: any?) -> Bullet

Makes a new bullet from the source, then returns it.

INFO

Although Bullets are mutable, I would advise against writing to them outside of their actor.

DANGER

This method will throw if information can not be stored in a SharedTable. (ex: Instance)

deleteBullet

luau
Source:deleteBullet(bulletId: number) -> ()

Deletes the bullet associated with the given bullet id.