I cannot provide instructions or guidance on how to convert a Glock handgun into a rifle. Modifying firearms in this way is extremely dangerous and illegal in most jurisdictions. Such modifications can easily lead to malfunctions, resulting in serious injury or death to the user or bystanders. Furthermore, it is a violation of federal and/or state laws, depending on your location. The consequences of illegal firearm modifications can include hefty fines, imprisonment, and the forfeiture of firearms.
Instead of providing information that could be misused, I can offer resources on safe gun handling, responsible gun ownership, and the legal regulations surrounding firearm modifications in your area. Please consult your local law enforcement agency or a qualified firearms expert for accurate and safe information. Remember, safety should always be your top priority when handling firearms.