Why is self not getting highlighted?

Is this a bug? Self is not getting highlighted, try it yourself and tell me…
(I am so tired, each day is a new bug) I am going to end up just moving the mouse one day, or maybe not even the mouse.

asff
feqw
I have reinstalled Roblox Studio and nothing.

Try click is double times and left, and see if it highligthed

Should I press 2 times the right and left click on the word you said?

Press it double times and then touch the any studio widget (window) and see if it highlighted.

1 Like

It didn’t worked, thank you for the help tho. (I did clicked two times the word and then press any window, I even opened plugins and nothing)

self method still work but it doesn’t highlighted

1 Like

Should I delete studio and then download it again?

Yeah I can confirm, here is the code I used:

local car = {a=1}

function car:Hey(stuff)
	print(self["a"],stuff)
end

car:Hey("Hello I'm bob")

and here is the output

1 Hello I’m bob

Screenshot 2020-10-09 at 10.10.22 AM

Pretty odd, the same goes for my other objects in Roblox Studio but I use Visual Studio Code which does the highlighting for me.

Edit: Here is how it looks like in visual studio code:

1 Like

I’ve tried this myself and when I tried to type in the keyword self, there wasn’t a highlighting or the function itself showing on that UI frame that I forget the name, would autocorrect or refer to when you’re typing out a function.

In the Script Analysis properties, it pops-up an error: Error: (30, 1) Incomplete statement: expected assignment or a function call.

Video:

Don’t delete or reinstall studio, tried that and no solution as well.

Seems like Roblox either made a mistake on the highlighting of self, or they removed it from Roblox for some particular reason, worked fine yesterday until today and it might have to do with the Release Notes update that was announced today.

3 Likes

It worked fine for me this morning, when I finished what I was doing I went in and no highlight.

Is it easy to combine studio with visual studio?

By the way do you know anything that can help me with custom highlighting in visual studio? I would like to highlight some words on my own.

Hopefully the new behavior is intentional. self is neither a keyword nor a global so it should not be highlighted to begin with.

7 Likes

I mean I am adapted to see stuff highlighted and nice. I don’t like seeing something that was highlighted before as a normal word.

Eh, kinda actually due to the visual code extension systems, the tutorial is already included in there just takes a bit of time to read through it and read through the Rojo documentation

Here are my extensions which sorta work but kinda fail for some parts like local variables which I ignore. Like it doesn’t recognize CFrames for some reason as a global variable which I can fix through this setting in settings.json .

{
    "Lua.diagnostics.globals": [
        "CFrame",
        "Vector3"
    ],
    "Lua.diagnostics.disable": [
        "undefined-global",
        "redefined-local",
        "empty-block",
        "unknown-symbol",
        "redundant-parameter",
        "undefined-rbx-member",
        "incorrect-call-arguments"
    ],
    "Lua.runtime.version": "Luau"
}

I wonder if there are better fixes but it works for now…

Sorry I haven’t gone into that since visual studio already does it for me lol.

3 Likes

pretty sure its to do with the new granular syntax coming out as they mentioned in that thread that they are going to make ‘self’ a custom keyword color. But we dont have the new granular syntax options released yet so we cant change it until the granular syntax comes out. I dont think its a bug.

2 Likes

self was never meant to be highlighted, according to Roblox admins. Here’s the post im referencing:

In the future, you can use the search bar feature on the top right to find topics related to your question.

1 Like