I've been trying to make a little program that finds 'tiles' (parts) in a game and creates a 'tileinfo' script inside them, which uses the LinkedSource thingy to put the code in tileinfo. I use LinkedSource cause I don't know if it's possible to write code in a new script from a different script.
tile = game.Workspace.bigtile --finds a tile
Instance.new("Script", tile) --creates a script inside of tile
tile.Script.Name = "tileinfo" -- names the script
tile.tileinfo:LinkedSource()rbxasset://Scripts/tileinfo
That last line of code is causing me loads of trouble, and I have no idea why.

1 comment
No, you can't edit a script's source(or attach a linked source) while in-game, it can only be done in Studio.