Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What is the proper syntax for LinkedSource?

Asked by 8 years ago

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.

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. LegitimatlyMe 519 — 8y

1 answer

Log in to vote
0
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
8 years ago

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.

0
Thanks a bundle. The roblox wiki made no sense to me on this matter, and nothing I tried worked. blockjack78 5 — 8y
Ad

Answer this question