Lets say I have a ModuleScript called A, with a child ModuleScript called B.
When modulescript B has a warning in it, from 20 characters in to 25 characters (the warning underline), the warning underline will also occur in modulescript A at 20 characters in to 25 characters.
Example code of modulescript A:
local a = {}
local B = require(script.B)
function a.init()
B.doSomething()
end
return a
example of modulescript B (purposefully has warnings inside of it):
local B = {}
function B.doSomething()
print(abcde)
c = a
l = m
end
return B
Warning in module script B(expected):

Warning in module script A(unexpected):

Script Analysis:

Parent hierachy:

As far as I’m aware, this occurs any time where a module script is inside another module script, and the child module script has warnings inside of it.
I have only started to convert my game to a modulescript structure recently, so I don’t know when this started occuring.
Reproduction:
Create a module script named A in workspace
Create a child module scriptnamed B inside module script A
Copy this code into module script A:
local a = {}
local B = require(script.B)
function a.init()
B.doSomething()
end
return a
Copy this code into module script B (or write anything that will cause a warning):
local B = {}
function B.doSomething()
print(abcde)
c = a
l = m
end
return B
Bug seems to occur 100% of the time when the steps shown are followed.
Place:
WeirdError.rbxl (17.9 KB)
Only affects studio / Visual bug no other problems
System Specs:
Ryzen 5 2600 @ 3.7ghz
RTX 2060
12GB RAM (3x4)
Windows 10