Weird Output error

I have this chunk of code:

When playing, I’m getting this error:

Although the error is happening, the script still runs perfectly fine and the equalizer is applied to all sounds. Why is this permission identity error happening? Is it because scripts aren’t allowed to access the ClassName of certain game objects? I tried :IsA() too.

1 Like

You’re trying to access something that’s a child of game in a service that the script context doesn’t have access to.

Aka, CoreScript locked Sound or something of the sort.

try doing a services table, and use it with the for loop

Some services and their descendants (for example, CoreGui) are RobloxLocked, and since normal scripts can’t do anything with such instances, it throws an error.
To solve this, use GetDescendants() only on services where sounds can be located (workspace, SoundService, maybe somewhere else, etc.)
Also, why do you use spawn() in this case? Your code doesn’t yield, so I think it’s useless here.

NewTween() has yields in its function

Cool, but have you changed the objects you GetDescendants() from?

yes, I only need to access workspace sounds

Nice, now you should mark the post that solved your problem as “Solution”.

I implemented his table solution for ease of adding new services if needed.

1 Like