The Hidden

Jack DeVries (Chris Mulkey), a quiet citizen with no criminal past, robs a Los Angeles Wells Fargo bank, kills all of the security guards inside, and leads the Los Angeles Police Department on a high-speed chase. The chase ends when DeVries encounters a police blockade overseen by detective Thomas Beck (Michael Nouri). DeVries is shot several times, smashes through the blockade and crashes the Ferrari he is driving. DeVries is taken to a hospital, where a doctor informs Beck and his partner, Det. Cliff Willis (Ed O'Ross) that DeVries is not expected to survive the night.
Upon his return to LAPD headquarters, Beck and his supervisor, Lt. John Masterson (Clarence Felder), meet FBI Special Agent Lloyd Gallagher (Kyle MacLachlan), who informs them that Beck has been assigned to work with Gallagher to track down DeVries. When told of DeVries's condition, Gallagher rushes off to the hospital.
Meanwhile, at the hospital, DeVries suddenly awakens. Disconnecting his life-support equipment, he approaches the comatose man in the next bed, Jonathan P. Miller (William Boyett). After DeVries forces Miller's mouth open, a slug-like alien emerges from DeVries' mouth and transfers itself into Miller's body. Gallagher arrives to find DeVries dead on the floor and Miller's bed abandoned. Gallagher tells Beck to put out an alert on Miller, who refuses, because of Miller's lack of a criminal history.
Miller goes to a record store where he beats the store's owner to death. He then goes to a car dealership, where he kills three men and steals a red Ferrari. He then visits a strip club, where the alien leaves Miller's body and takes over the body of a stripper named Brenda (Claudia Christian). Gallagher asks police to track Brenda when he sees her picture next to Miller's body. Brenda is then propositioned by a cat-caller, she accepts and follows him to his car. They proceed to have vehicular sex in a parking lot which results in his death. She then takes his car. Gallagher and Beck pursue her to a rooftop, where they mortally wound her in a gun battle. As Brenda dies, Gallagher points a strangely-shaped, alien weapon at her; however, she leaps from the roof. As Masterson arrives from his house to take charge of the scene, the alien transfers itself from Brenda's dying body to Masterson's dog.
Frustrated by Gallagher's continuing refusal to explain the strange phenomenon of ordinary citizens turning into crazed killers, Beck arrests him and puts him in a jail cell. Beck soon learns that "Gallagher" is an imposter, impersonating the real agent Gallagher, who is dead. When Beck confronts "Gallagher" with this information, "Gallagher" tells him that he ("Gallagher") is an extraterrestrial lawman and that they are in fact pursuing an alien thrill killer who has the ability to take over human bodies. Beck dismisses the story as insane and leaves "Gallager" incarcerated in a jail cell at the police station.
Back at Masterson's house, the alien leaves the dog's body and takes over the lieutenant's body. In the morning Masterson goes to the police station and seizes a number of weapons, sparking a shootout between himself and the station's police officers as he attempts to track down "Gallagher". Convinced of "Gallagher"'s story due to Masterson's immunity to excessive bullet wounds, Beck releases him from his cell, and the two confront Masterson. During the resulting shootout, Masterson confirms that "Gallagher" is an alien law enforcer named Alhague who has been pursuing the alien ever since it murdered his family and his partner on another planet. Though Beck manages to stop Masterson, Alhague/Gallagher reveals that his weapon can't kill the alien when it's inside a Human body as the weapon doesn't work on Human skin, thus requiring him to be present when it is transferring hosts. They are unable to stop the alien from abandoning Masterson's body for that of Beck's partner Willis, who then escapes the station.
Using Willis' credentials, the alien tries to gain access to Senator Holt, a likely presidential candidate, at the hotel where the senator is staying. Alhague/Gallagher and Beck follow Willis, and a shootout ensues between Beck and Willis, during which Beck is severely wounded. As Willis, the alien corners Senator Holt and enters his body before Alhague/Gallagher can stop him. "Holt" then calls a press conference and announces his candidacy for the presidency. Alhague/Gallagher is forced to attack Holt in the middle of the press conference; though shot several times by the police and the senator's bodyguards, Alhague/Gallagher is able to get close enough to use a flamethrower on Holt. As the alien emerges from Holt's charred body shocking everybody, Alhague/Gallagher kills it with his weapon before himself collapsing.
Taken to the hospital where Beck is being treated, Alhague/Gallagher discovers that Beck is close to death. Witnessing the emotional suffering of Beck's wife and daughter, Alhague/Gallagher transfers his life force from Gallagher to Beck as Beck dies. When she sees her miraculously "recovered" father, Beck's daughter initially hesitates when he reaches out to her, but then smiles and takes his hand.

Question: When can't the weapon kill the alien ?
Answer: The weapon can't kill the alien when it is in a human body.