So I have received an error in my console, which I can’t seem to fix. I have tried to move everything under ServerScriptService, however errors are still returned.
The error occurs because you attempt to get the Settings child of ServerScriptService, but, at the time of the attempt, there is no child named Settings.
To avoid the error you need to place the instance named Settings under ServerScriptService. If the error persists, ensure that it is not being re-parented to another location.
Which script is that in? If it is one of those scripts under ServerScriptService then it should be fine, but then why are you updating the parent to ServerScriptService when it is already under ServerScriptService?
You should not use this syntax unless the members you’re indexing have spaces in their names.
You should try using script.Parent:WaitForChild("Settings") instead, because it’s possible the script is running before the instances you’re indexing have loaded into the game.
What? That’s fundamentally not true. You should only use that syntax if you cannot index the child normally. You should use :FindFirstChild if you’re not certain a child exists.
The purpose of WaitForChild is for getting instances which you can’t guarantee exist when the script runs. (LocalScripts in ReplicatedFirst)
This isn’t only useful on the client though, you may create some instances on the server which you will have to wait for. (especially with tools being cloned into a player’s backpack)
This is getting off topic. As a courtesy to the OP I would suggest we stop.
The issue is that there’s no child named Settings or Minigun in SeverScriptStorage. Are there in fact Instances by those names in SSS, @supercool2002? If so there may be problems with your code.
If this is true, then it was trying to get an object named “Settings” under workspace. You never showed us the full explorer, so we had to assumed it was one of those scripts under ServerScriptService. The script should be moved so it is correctly getting the module for Settings.