How would I make a laser shot by a part using raycast?

I want to make a part shoot lasers at the nearest player using raycasts, but unfortunately, I don’t know much about raycasts. I’ve already figured out how to get the nearest players but don’t know how to create a laser from the part to the torso.

Hi,

Please check out: Hit Detection with Lasers | Roblox Creator Documentation

This would work but i’m trying to make a part shoot you with the laser, not using mouse.