-
What do you want to achieve?
I am trying to make a module script that can be loaded into other games, and one of the scripts in this module script gets placed in StarterPlayerScripts (its parent is another script, and that script sets the parent to StarterPlayerScripts). I want to make all players already in the game also have this script placed into their player scripts. Players that join the game after the require() of the module script do not have the issue. -
What is the issue?
The player cannot have the script parented to them, because of the fact a server script cannot parent things to PlayerScripts. I am trying to have the script apply to all players in the game that did not rejoin after the script is executed. This does not happen. -
What solutions have you tried so far?
I looked around and found nothing to help. Server Scripts can’t write to PlayerScripts, and players would have to rejoin in order to have the script work because it gets parented to StarterPlayerScripts.
The biggest problem itself is that everything needs to be localized in the module script, as the module is designed to be imported into other games as they need it. I can’t make another script in StarterPlayerScripts to fix this issue.