This research paper explores the use of chatGPT to facilitate the development of educational experiences in the Roblox metaverse, specifically focusing on the electrical machine course. The primary objectives of this study are to demonstrate how chatGPT can streamline the creation of immersive and interactive learning environments within Roblox and to evaluate the efficacy of these experiences in engaging students and enhancing their understanding of electrical machines. Our approach leverages chatGPT's capabilities to optimize client-side scripts for server-side implementation efficiently, create well-structured dictionaries for describing game activities, stages, and points, and simplify the implementation of various effects and interactions. Upon completing our Roblox-based educational experience, the resulting code will be available under a Creative Commons license, allowing other educators and developers to build upon and customize our work for their needs. We tested this project with a group of 22 college-level students studying electrical machines, whose feedback has been instrumental in understanding the effectiveness of our methods and identifying areas for improvement. The results of this study suggest that integrating chatGPT into the development process of Roblox-based electrical machine-learning experiences can lead to increased student engagement and understanding. Further research is recommended to explore the broader implications of using chatGPT and other AI-powered tools in developing metaverse-based educational content across various subjects and learning environments. By doing so, we can continue to push the boundaries of what is possible in virtual education and provide more engaging and effective learning experiences for students worldwide.