Can someone please simplify the usage of packages for me?

So recently, I have been trying to find a way to sync scripts across different places in a universe that all do the same things, and recently ran into Packages. I tried reading through this but am pretty confused as to how to actually use them correctly.

Would it be possible with packages to replicate changes of a script from the main place in a universe to all other scripts in different places in the same universe?

1 Like

AFAIK, when it comes to the Auto-Update setting, packages only update on the Studio side. For example, if you update a tree model to have pink wood instead of brown wood, your live game will still have brown wood. But if you go into Studio, the packages will be updated to their latest version (pink wood). It won’t take into effect until you go into each place and publish it with the new package. Which doesn’t help developer workflow for easy/mass updating.

I think they are meant to help the Studio workflow rather than be an experience utility. If you’re just looking for Studio flexibility, the Auto Update setting should greatly help with editing scripts/models across places.

If you’re looking for something where your scripts are auto-updated across your places in a live experience, you can use InsertService to insert the latest version of the packages or find a method to republish places upon package updates like this one here.

This has been a much needed and highly requested feature across developers. Since they determined it could be “very dangerous action” for large live games, I don’t know why they didn’t just add an option for “Publish Auto Updates” or “Live Auto Updates” on top of the existing Auto Update setting. :man_shrugging: I feel that it should be the responsibility of the developer to ensure they are using trusted packages that won’t update maliciously or better yet just reserve the “Live Auto Updates” setting for package owner places only.

I could be wrong though because I haven’t utilized packages in a while due to those reasons. That info could be outdated since it’s a post from 2019. They may have since added support for that exact functionality but I haven’t noticed any updates regarding it.

I mostly use the InsertService method for scripts that aren’t ReplicatedFirst. However, I have to come up with many different workarounds since there’s the delay it takes to insert packages. (Such as gathering current players since scripts are inserted after PlayerAdded would normally be triggered, waiting for other scripts/objects, reparenting, etc.) Also, if they need to be in a specific location, the published scripts need to be disabled then re-enabled after being reparented. It’s a huge hassle for a feature that has been long since overdue.

1 Like

So theoretically, If I had a folder of Scripts in PLACE1 and I turned that folder into a package, then put that folder package into PLACE2, that would replicate the script changes made in PLACE1 TO PLACE2, is this correct or am I misunderstanding?

1 Like

You’d need to update the package again, and in order to do this you need to load the other game, and then publish it as well. Otherwise, it won’t update in the other places the package is used.

2 Likes