How do I make a "script editor" like in Lua Learning?

Hey, I’m not even sure were to begin, but I need help making a script editor like in the game Lua Learning

So, basically the script editor in Lua Learning (In the lessons tab) does not run the code, but it still knows that it does that even if there are extra bits such as notes, and i’m wondering how can I make the same thing for my game that you basically control a robot/object by typing functions, which also leads me to the next question: how do I make specific functions added by the code? What I mean is how do I make a script to make a function automatically that can be run in the script editor?

If anyone knows how do I make these, please let me know, or at least link me helpful resources.

This is not exactly what I’m talking about, but thanks for sending this!

I mean like a live IDE, such as in vs code, and in the roblox official “script creator”/ “script editor”

You can use loadstring(Code)

Yes, but here are some reasons why this isn’t what I want:
1. It’s dangerous, people can run ANY code they want/
2. It won’t highlight any things (like how roblox studio has it)
3. It isn’t smart.++

  1. You can use string.find to remove some functions
  2. There are some modules that highlights textboxes

Thanks, I will for sure have a look at that!

For code execution, use loadstring, you should look into sandboxing the environment along

1 Like

Solved but you could use RichText for this with TextLabels that shows the actual code, and the TextBox having TextTransparency set to 1.

1 Like