Still have questions? Join our Discord server and get real time help.
2

# How would I be able to create a script with code placed in it?

uhTeddy 101
2 years ago

This has been a question I wanted to know the answer for, I see plugins do it all the time. I know it is possible but all "Scripting Helpers" answers I have seen so far on various Question is a StringValue and using its value to loadstring(), though when you are using a plugin (like I want to create) you want it to be able to open the script with the code in it, not in a StringValue. Please help if you can.

1
cabbler 1937
2 years ago

Since plugins are studio-only and assumed to be trusted there are few restrictions. All you have to do is search the api.

Create and open script:

local scr = Instance.new("LocalScript",game.StarterGui)
scr.Source = "test"
plugin:OpenScript(scr,1)

0
Thanks! uhTeddy 101 — 2y