May 25, 2020, 6:14pm
I want to check if the instance permission level is below 5, for example:
if instance:GetPermissionLevel() <= 4 then
if instance.permissionlevel <= 4 then
So you probably get a point, so how I would be able to check if I can access certain instance?
Since I am trying to avoid getting the errors such as those:
May 25, 2020, 6:16pm
What is this for? Instances don’t have permission levels. You can use the function
printidentity() to get the permission level of the thread.
May 25, 2020, 6:16pm
I am making antivirus plugin, which scans everything, but I want to avoid getting errors, so I want to double check if I can access the instance.
May 25, 2020, 6:18pm
Plugins have a very high permission level, they can access things like coregui, so I don’t think this should be an issue? And btw what is the point? It is very easy to check for viruses/backdoors, there are tons of tutorials and posts on it
May 25, 2020, 6:19pm
My point that I am developing my own antivirus, I have right to anyways, can you give an example on how to use
May 25, 2020, 6:20pm
Just call it and in the output you will see “The current identity is X”
That is it.
May 25, 2020, 6:21pm
So there is no way to check if I have access to certain
May 25, 2020, 6:22pm
As I said plugins have access to a lot of things, so if they’re able to insert into locked stuff then you can look for locked stuff too.
May 25, 2020, 6:23pm
Yeah but I am running to problem where I am getting lack of permission on level 5, but i have 4, so I just wanted to know how I would able to check if I can access it, without getting errors and stopping the script. I am thinking of using
Yeah, use pcall() to avoid the error being thrown; there’s not any way to check a Service’s permission level as far as I know.
May 25, 2020, 6:27pm
I wish there was
.RobloxLocked or a
.permissionlevel thing, which would allow us as developers easily check if we have access to it, instead of creating blacklist to prevent accessing those.
You can always make a
# post to request it. platform-feedback:studio-features