The standard way to script this in Roblox Studio involves creating a grid of "Cells" and removing walls between them randomly.
If you are playing the popular The Maze Runner Remake , your primary goal is to find the exit using specific items.
For a maze that builds itself as you watch, refer to Graph-based Maze Generation techniques.
Learn how to create paths that lead to every tile using Iterative Implementation .