I started up Roblox Studio today, and I got this fun random set of warnings today… now warning me about using “Client” runContext scripts in… StarterGui… of all places. I’ve never had this warning before, and I’ve always checked the programming behaviors beforehand to ensure that they behave as expected. I’m assuming that this is likely just an intermittent bug with a later release of Roblox Studio? I’ve never had this problem before, and this came out of nowhere. Am I supposed to strictly be using LocalScripts or something only in StarterGui, or can I just ride this one out until the warnings disappear with a later patched update to Roblox Studio? Thank you very much in advance for your help on the matter.
Roblox Scripts have this property called RunContext. Just change it to Legacy if it’s not already.
Okay, an update… I went ahead and copied over the code in those client context scripts to the LocalScript object specifically, and I am no longer getting those warnings anymore. Plus, it also improves performance because those scripts designed for client-side processing no longer need to do a now redundant check to see if a copy of them manifested in the StarterPlayers/StarterCharacters/StarterGui containers specifically, as it is known that they will only manifest with the local player/character/playergui folders as LocalScripts. I can now understand why this warning now exists, as it is more explicit about how the script duplicates into the starter_XYZ folders in addition to the current local player folder’s equivalent, hence the “running multiple times warning.” Not sure why I ever even used client-context scripts in the first place there, as I knew about this duplication logic even then and accounted for it where the effected scripts would simply self-destruct. Problem solved!