Unable to set property LinkedSource, type Content

Whenever I try setting a LinkedSource of a newly created script (with no parent), it gives me this error:

and this is the line where it happens

It should work fine when I set the LinkedSource manually, but it doesn’t. As you can see, the script exists in the game explorer.

We don’t currently allow scripts to dynamically become Linked or to change the source they have (there are a few technical limitations that currently prevent this). The easiest way to get this kind of behavior is to have an instance of the linked script somewhere (e.g. ReplicatedStorage) and :Clone it.

Alternatively you can also create a model with the LinkedScript and insert it using insert service, but this feels more clunky.

We are discussing internally weather we can add an API to directly create instances of linked scripts, but we don’t have immediately plans to add this.

[quote] We don’t currently allow scripts to dynamically become Linked or to change the source they have (there are a few technical limitations that currently prevent this). The easiest way to get this kind of behavior is to have an instance of the linked script somewhere (e.g. ReplicatedStorage) and :Clone it.

Alternatively you can also create a model with the LinkedScript and insert it using insert service, but this feels more clunky.

We are discussing internally weather we can add an API to directly create instances of linked scripts, but we don’t have immediately plans to add this. [/quote]

Isn’t the whole purpose of LinkedSource to eliminate having to do that?

[quote] We don’t currently allow scripts to dynamically become Linked or to change the source they have (there are a few technical limitations that currently prevent this). The easiest way to get this kind of behavior is to have an instance of the linked script somewhere (e.g. ReplicatedStorage) and :Clone it.

Alternatively you can also create a model with the LinkedScript and insert it using insert service, but this feels more clunky.

We are discussing internally weather we can add an API to directly create instances of linked scripts, but we don’t have immediately plans to add this. [/quote]

Isn’t the whole purpose of LinkedSource to eliminate having to do that?[/quote]

Nah, I think its purpose is to stop redundant code.