How to make coding In-game

i want to make a in-game studio so players can make their own games but the problem is how would i make it so players can code in-game and i realised that functions like game.Players.PlayerAdded would not work since a player would join before any User-made script was ran.

You use loadstring() in a server side script

But you need to enable it in server script service

what if players need to make local scripts for their games

Well the script using the loadstring() Would be different script and not in-game I don’t know a way to run local scripts as loadstring, because times you need it, it would break the loadstring.

I dont know if you can use loadstring in a local script, but I would say no.