The current thread cannot access 'StreamingService' (lacking capability Assistant)

Running a v:IsA() on a child of game:GetDescendants() seems to emit an error:

The current thread cannot access ‘StreamingService’ (lacking capability Assistant)

Example:

for i,v in pairs(game:GetDescendants()) do
	if v:IsA("BasePart") then
		print("Test")
	end
end

Expected behavior

Using v:IsA() on a child of game:GetDescendants() should run normally

A private message is associated with this bug report

9 Likes

I’m starting to see this is well thank you for reporting it. :slight_smile:

1 Like


Same here, broke the UI on my game.

1 Like

Same problem here. You just gotta love testing in production.

1 Like

Same happens for one of my plugins.

I can’t even use a bunch of my plugins because of this.
Good job Roblox. Let’s see how many years it takes to fix this one.


Best regards,
Pinker

try my solution

for i, v in {workspace, game.ReplicatedStorage, game.ReplicatedFirst, game.StarterGui, game.StarterPack} do
	for i,v in v:GetDescendants() do
		if v:IsA("BasePart") then
			print("Test")
		end
	end
end

i dont know why my answer got deleted, but here is some explanation
StreamingService is child of DataModel.
According to error
Regular scripts can’t mess with that except for scripts with higher permissions.

the current solution is don’t use game:GetDescendants()
use the merged table of multiple objects

like this

for i, v in {workspace, game.ReplicatedStorage, game.ReplicatedFirst, game.StarterGui, game.StarterPack} do
	for i,v in v:GetDescendants() do
		if v:IsA("BasePart") then
			print("Test")
		end
	end
end

Thank you for the report. We’ve identified the issue and expect a fix to ship with the Studio release next week. This issue should only affect Studio sessions and not production servers.

If you need a workaround in the meantime, you can wrap the if statement in a pcall:

for _, v in game:GetDescendants() do
	pcall(function()
		if v:IsA("BasePart") then
			print("Test")
		end
	end)
end
3 Likes

Another workaround is to simply just test in Roblox Player: it’s frustrating but prevents any unnecessary changes to be made to scripts.

1 Like
for i,v in pairs(game:GetDescendants()) do
	if  v ~= game.StreamingService and v:IsA("BasePart") then
		print("Test")
	end
end

yooo it worksss

1 Like

I believe that external features may have a role in some of these errors. My game that has several contributions on it is getting this error even when I remove and disable all uses of game:GetDescendants() like the one used in our loading screen.

I fixed this day ago, you need just turn AudioApi to automatic or just disable. (game.VoiceChatService.UseAudioApi)

1 Like

Oh my… it wasn’t my problem. Where did my 2 hours go?

has this been fixed? my studio updated about two days ago and this issue is still present

Hi developers, I wanted to provide an update as this week’s Studio release is rolling out.

To check if you’re on the latest version of Studio, you can go to File > About Roblox Studio and make sure it says Version 0.650.0.650____.

If you wrote code that specifically checks game:GetService("StreamingService") or game.StreamingService, I would recommend removing it. StreamingService does not exist outside Studio so this code may error, and because it is an internal service that might be removed in the future, your code in Studio could break as well.

Thanks again for the report!

Hi, this appears to be unrelated to the StreamingService error fix. Please refer to this topic for more information about the issues you’re seeing, as I believe they are related: Elements of User Interface not Rendering as Invisible