I’m not completely sure what you’re asking for but type checking should be the way to go.
What I’m asking is that I want to make it so that when you try and access the index of a table it will show all the instances that shows up in the first parameter of Instance.new
Here is a photoshopped image of what I want to happen
Is this for a command bar system or something similiar for clients?
Or do you just want this to be used in your scripts when you’re coding?
In my scripts
3030303030 chars
Yeah, so I think you need to type check. That way you get the auto writer thing.
Also, if you wanna take the easy way there’s apparently a studio code editor module that actually type checks everything for you automatically so it will always show you the auto writer thing.
I think it was called VSC?
No I wanna do it with typechecking
Well alright then, do you know how to?
Ok thanks
If it’s what you wanted I think you should mark it as a solution for other people.
I can’t really find what I wanted
There is nothing that tells me how to do this
Simply, sometimes roblox’s auto type writer does not occur because roblox does not know what type you are writing.
Type checking solves this since roblox will know what type you are accessing.
I can provide some code in a second.
It’s been 3 hours lol But thanks for the help
You can’t 100% replicate the menu because that behavior is builtin. The closest you can get to that is:
Although, if you really needed to, you can do this:
local create: typeof(Instance.new) = function(class)
-- ...
end
create( --> this will give you a list of class options like in the screenshot
But you cannot customize the behavior beyond what the engine has defined for it
string.find would be the one.
30limitcharcharchar
oh boy you’re gonna have fun learning what magic types are.
The short answer is, unless you want to statically generate a string union with 500 different strings, its not possible, though if you want to bully yourself, the syntax for this is:
type StringUnion = "cat" | "dog" | "fox"
function makeAnimal(animalType: StringUnion)
end
What
Bro you haven’t explained properly, i can’t read your mind.