Create a new LocalScript (doesn’t really matter what type of script) and paste the following code:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local TextureFolders = nil
local ElapsedTime = 0
local UpdateTime = 0.05
RunService.Heartbeat:Connect(function(DeltaTime:number)
ElapsedTime += DeltaTime
if ElapsedTime >= UpdateTime then
ElapsedTime -= UpdateTime
TextureIndex += 1
if TextureIndex > 17 then TextureIndex = 1 end
script.Parent.TextureID = TextureFolder[tostring(TextureIndex)].Texture
end
end)
The script has an unassigned TextureFolders
variable, with a TextureFolder
“misspelled” version written below.
If done correctly, an orange bar should appear at the top without stating its existence reason:
Opening up the Script Analysis window shows a warning stating “Luau::follow detected a Type cycle!!”:

This causes the editor to break for all scripts, causing autocomplete and syntax compiling to not work:
Restarting Studio fixes the issue. Opening the bugged script causes the bug to occur again. To note I have the New Luau type solver enabled. Disabling it also fixes the bug in all cases.
Expected behavior
I’m expecting the script to underline the TextureFolder
as being UnknownGlobal, not break the whole editor.