Now when they heard this they were cut to the heart, and said to Peter and the rest of the apostles, “Brothers, what shall we do?” And Peter said to them, “Repent and be baptized every one of you in the name of Jesus Christ for the forgiveness of your sins, and you will receive the gift of the Holy Spirit. For the promise is for you and for your children and for all who are far off, everyone whom the Lord our God calls to himself.” And with many other words he bore witness and continued to exhort them, saying, “Save yourselves from this crooked generation.” So those who received his word were baptized, and there were added that day about three thousand souls. (Acts 2:37-41, ESV)
The people who heard Peter's sermon on the day of Pentecost were "cut to the heart" and respond. This is a work of the Holy Spirit because, a couple of chapters later, after a very similar sermon, the hearers respond in anger. Peter's job is to "bear witness" to Jesus, the Holy Spirit does the work on the heart. We cannot make people respond, we cannot convict people of sin, we cannot transform hearts, we cannot produce faith. Thankfully, there is someone who can!