Hello, this question might be pretty technical, but it’s actually pretty simple. I can’t seem to solve it, though.
Say I was creating a package, or a model asset that I was about to sell that created explosions where ever you clicked. For example:
Now, in the client, there are of course LocalScripts, but in the server there are Scripts. Scripts run in the workspace, LocalScripts don’t. How would I get the LocalScripts to where they need to be? Again, this question is probably really easy to solve, but I already tried reparenting, but there still are other resources in the main package, and what if the person reparents the package? Then I won’t know where to find those resources! Please help, is it just me?
LocalScripts only run when parented inside a Player or a Player’s character. You’ll have to use remote event or use a connection to get the local scripts to run for when the explosions are created (assuming you want all players to see the explosion.)
This is sort of what I’m saying, but how do I get the local scripts to get in the player, without just manually telling the user to parent the local scripts to the desired location, and not moving the main package out of the workspace? I mean, what if they want to move it around? I want to make the package flexible.
Hm… I have a different idea, not sure if it works for your case but here it is:
If you change the class of the script to “Script” but set the RunContext property of it to “Client”, it will work like a LocalScript but it will work anywhere (including the Workspace, and most importantly in this case, your package.)