So today I was testing my game’s UI in a server, only to realize I couldn’t actually do anything with it because the server can’t access PlayerGui.
We need a way to run code on the client through the developer console. If you want use cases, just look at what the current command bar does – debugging things in a live server, playing with your remotes, etc.
Although nice, this presents some security issues, namely that you don’t want a compiler on the client. One way I can think of to do this is to ping the server, have it compile the code, then send it back, but I have no idea how efficient this’d be. It’d also open up room for exploiters to more easily be able to guess the bytecode format of Roblox Lua.
I don’t really believe efficiency should be much of an issue considering that you wouldn’t be able to spam commands. And there’s always throttling as an option, too.
Also, what @wravager said lol. Even if it’s not compiled on the client, the bytecode or whatever still gets sent, right?
Code is compiled beforehand on the server and sent to the player when they first join. Yes, hackers can learn from this bytecode, but it’s a much lengthier process.
Remember when loadstring was removed, and everyone threw a fit saying that ‘most hacks don’t use loadstring anyways?’ Well, loadstring being removed was just a side effect of the compiler being removed, which a lot of hacks were using.