Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What is the proper syntax for LinkedSource?

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

0

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

1 answer

✓ Accepted answer

LinkedSource is a string. It looks like you tried to invent your own programming syntax on that last line, but it actually doesn't make any sense. tile.tileinfo.LinkedSource="rbxasset://Scripts/tileinfo" would be the correct syntax.

1 comment

0

Thanks a bundle. The roblox wiki made no sense to me on this matter, and nothing I tried worked.

This discussion is preserved as it was. New answers, comments, and votes are closed.