I want to make a plugin that creates scripts based on blocks,but i don't know how to change the source of a script. Can someone help me?
✓ ANSWER ACCEPTED
How do i change a script's source via another script?
1 answer
✓ Accepted answer
To change the source of a script is only possible when using plugins. Here's an example.
local NewScript = Instance.new("Script",workspace)
NewScript.Source = [[
print("This is my script!")
]] --changing the source
print(NewScript.Source) --printing the source (getting the source)
Please accept my answer if this helped!
2 comments
0
THANK YOU SO MUSH O.O
0
Oops, messed up line 1. Just fixed it.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
You can create a pastebin using their APIs, set the source of the script to the raw text of the link, and then delete the paste.
But my plugin isn't suposed to get sources online,it was supossed to CREATE sources
No, use an API to create a paste with all the text you want to put in the script, not get a pre existing one.