This is cool, but it would be nice if autocomplete was a little smarter in its suggestions. What I mean by this is it sometimes just gives suggestions that make no sense. For example if you type in game:G
you’ll probably get GetAttribute
because it comes first alphabetically, but that is seldom used. It would be much nicer if it knew that game:G
usually means game:GetService
which is the second suggestion (at least for me). It would definitely improve workflow if it was able to analyze widely used code (kinda like copilot from github, but not that advanced) just to know what good suggestions would be. I’ve personally never used game:GetAttribute
and I don’t know anyone else that has, GetService
should definitely have priority over GetAttribute
. There are some other places where this would also help, too, but that one is the biggest I know of.
I haven’t tested it yet, but does the UX redesign imply it’s less “intrusive”? When I’m going line by line in scripts and need to copy things from the line above to the line below, I can’t since UX overlays it, and hitting Escape doesn’t close it.
Oh this is so awesome, I can’t wait to get proper internet again to be able to practice with scripting, this auto fill option will be extremely helpful to learn how things would and can go.
Thanks so much for this, I look forward to try it out.
I noticed this earlier today. Amazing update! Thanks roblox team.
Will we be able to add our own code samples for this some time in the future? Kinda like how we can in vs code.
Great update!
Can’t wait for you guys to (hopefully) add the ability to add our own definitions, parameters and code examples for our functions/methods.
Could you please send me your theme values? Lol?
i promise you that there’s no reason your script should be that big if your code is written well. try seeing if the bug persists with the same table/data in a smaller script.
That is not an excuse for it to not get fixed. (I said the bug happens mainly in large scripts, which states that does not happen in short scripts).
-
First of all, there is no reason for it to stop no matter how long the script is. I know if you end up with 10k lines it will probably start lagging because it has to highlight and find a lot of things for auto-completion, but 2k should be fine.
-
Second, the 2k lines is a Module full of utilities functions that I can use in my games and is that long. I divide the code using comment lines to state when something new has started. That’s how I do it and it will remain like that. Having a bunch of modules to separate unrelated tasks with just two functions or other things doesn’t makes sense to me. It probably does to you, but not me. I just do it if is really necessary and the data stored in the script is very different and large.
-
Finally, how long you write your code should not affect how auto-completion behaves.
or just use VS code. Builtin studio code editor is kinda bad ngl
I love this! Absolutely awesome!
I have one complaint though. The example given follows bad practice by directly picking the player from the workspace
by name in the way that it does. Unfortunately it’s easier said than done to avoid this (and still keep it simple) and it’s debatable whether or not that is necessary, but, I think it’s good to note that if these code examples are using bad practice (and don’t point it out), it could definitely end up encouraging bad habits (this is also a problem I personally experienced for quite a while having mostly learned from free models initially haha, it could be much more helpful to have a comment or a note to say that something might be a bad way to approach a problem)
In this particular example, I think a better option could be to go psuedo-code style and replace workspace.Player
with character
, but, this has it’s own problems (notably, it isn’t a working example!). I think an even better approach would just be to try and break down the “proper” way to find a character by name (even though it is more complicated).
But, it’s a hard to solve issue with a not clear answer as to what is the best route to take, I don’t discredit the example for that, I just think it’s good to point it out as a potential issue.
For example, here’s personally how I might rewrite this to try and address it while still trying to keep it simple. Comments could also be a good way to help introduce new devs to other concepts at a slower pace than they might encounter them otherwise.
local function onRunning(speed)
if speed > 0 then
print("Player is running at speed", speed)
else
print("Player has stopped running")
end
end
workspace.Player.Humanoid.Running:Connect(onRunning)
-- Note: 'workspace.PlayerName' isn't the best way to find a player's character
-- 'Player' instances you can find inside the 'Players' list have a 'Character' property you can use too
Great update, Roblox. Scripting will be much easier now. We appreciate the time and energy you guys put into making our developer lives better.
Please file issues like this as separate bugs with snippets of source code so that we can reproduce.
This sounds exactly like the Grepper chrome addon. I suggest that you check it out and for the engineers, that you take notes from how it works and implement something similar.
https://www.codegrepper.com
This is an absolute outstanding update, I always check DevHub for code samples, now this makes it x5 faster to make something
This is a terrible suggestion, in VSC you don’t have the Roblox built-in modules, and therefore you have to type it all yourself, and copy paste them, thats gonna be soo terrible, not gonna lie
Great update, will help quite a bit when unsure which API to use.
but… multiple cursors when
Sorry, was this a bug? I just found it rather cumbersome to read - didn’t know it was a bug, I was just using it as an example.
How do you turn off the code samples window if you don’t want it?
Umm yes you can. I use vs code on a daily basis and i can just insert the modules into studio(without copying and pasting it) and use the module normally
Could you please send me your theme values?