Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Unless I'm overlooking something you haven't assigned a value to bulletRigidbody so that's why it isn't doing anything. Without testing it myself you need something like:

GameObject bullet = Instantiate(//instantiate code)

Rigidbody2D bulletRigidbody = bullet.GetComponent<Rigidbody2D>()

And then set its velocity.