Hello! I have a module that references a Frame inside ScreenGui with ResetOnSpawn enabled. I first put it in ReplicatedStorage, but then I realized my mistake and moved it under StarterCharacterScripts. I think it isn’t the most appropriate place for a module as now I import this module like this:
local Players = game:GetService("Players")
local MyModule = require(Players.LocalPlayer.Character.Lib.MyModule)
That seems messy, because half of the modules is in ReplicatedStorage and the other half is inside the character model. Also, if I wanted to use this module outside of character scripts (e.g. player scripts, they don’t reset with the character) it will break.
So, how do I go about this? I could’ve dynamically accessed GUI in the module, but I want to tween a frame to make a fade-out effect and I don’t like creating tweens every time I need to apply this effect.