When you require a module script using the local player (as shown in the image),
type checking breaks and it returns an error type, the script still works, only the type checking and auto completion is broken.
(a video showing the bug, both of them point to the same script)
Thank you for checking in on this issue. It is a little bit unintuitive how this works and using PlayerScripts this way can lead to inconsistent behavior, for example if you place the script on the top into ReplicatedStorage, it will not run, because the script loading order will not let this script to load.
As far as Type Checking is concerned, it doesn’t know about the runtime specifics of Roblox, only whatever is currently available, so it will underline this.
We’re currently researching a more intuitive way of handling these and similar issues but there is not timeline on that yet. Ideally that would address this issue as well.