To be honest this is starting to get to me.. lol
I don't need my question getting deleted so i'll write a code attempt if anyone could answer this question it would help alot
Instance.new("Script",game.Workspace).Source="print(\"Hello World! v2\")"
note this isn't mine this is a script i found when trying to figure this question out
Sources cannot be set with a script, however, you can with command bar or studio property panel. What I am assuming what you want done, is to run a custom string in Lua. For that, we will need loadstring. For example, you could make a remote event and a client fires it.
game.ReplicatedStorage:WaitForChild('SentCode' --[[or the remote name]]).OnServerEvent:Connect(function(plr, code) pcall(function() loadstring(code)() --MAKE SURE YOU DON'T FORGET THE TWO PARENTHESIS AT THE END, I DO NOT KNOW WHY YOU NEED THEM BUT WITHOUT THEM THE CODE DOES NOT RUN. end) end)
If you are trying to do something else, please put a comment and tell me what u want to happen.