I don’t really know how to title this bug or issue without stretching it too long but I will explain what’s happening.
I’m implementing a method in a class where I’m checking for a field like this :
![]()
Now later in this function, I’m copying over a value from a field into a variable so that I can later modify and work with it, however :
![]()
self.RootYaw is annotated as a number manually, but the variable gets annotated as any instead.
Now when I use this ugly workaround :
![]()
The type is correctly annotated :
![]()
I know I could just keep using the workaround, but I’d rather not.
Note : I’m using Visual Studio Code as my editor along with the new type solver and the same issue occurs in the built-in Studio script editor.
If you write local newRootYaw = self.RootYaw without the : any, normally newRootYaw should inherit RootYaw’s type, that is if Prototype is well defined.
The any in the code is automatically rendered by Visual Studio Code. (Forgot to mention that, thought it would be noticeable since it has a slightly different color than the rest of the code)
![]()
And in Roblox studio it still shows “any”? If thats the case, can you please post how you defined Prototype?
Hello! Agreed, that seems like a bug, would you be able to share a minimal RBXL or script file demonstrating the issue? Sharing privately also works. It’s hard to tell what the root cause is here from the screenshot alone (for example I don’t know what a TagClass.TInstance is).
The entire source code of the project is available in this repository, this file has a bunch of variables with this problem.
Hello again! I checked out your repo and seem to have a working copy, but I’m not seeing the same issue as you:
- I cloned the repo you linked;
- I ran the setup as instructed;
- I’ve enabled the new solver;
- I opened the file in VSCode and it looks like the variable you’re citing has the correct type on my machine.
Is there any way you can reduce the example you see on your machine so we can narrow down the issue?




