A Tag Script is attached directly to a tag. It changes the value of that tag before the value is sent anywhere else. This means that if the tag is connected to multiple destinations, all of them will receive the value after the same script has been applied and the value will also be updated in the protocol itself.
A Link Script is attached to a specific link between two tags. It changes the value only for that one connection. This means that other links from the same tag will continue using the original value and will not be affected by that script.
When should you use each one?
Use a Tag Script when the value should always be processed the same way, no matter where it is sent.
Use a Link Script when only one destination needs a different treatment.
Simple example:
Think of a tag as a cooking pot and the links as plates being served from it.
A Tag Script is like seasoning the whole pot. Every plate served from it will have the same flavor.
A Link Script is like adding sauce to only one plate. That change affects only that plate, while the others stay the same.
