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
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.
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.
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: Mesh Scale is broken after recent Roblox update
@maxsterman09@proceduralhappiness We had to roll back Windows to v649 due to an issue in v650 (unrelated to this bug). Unfortunately that means this will remain broken on Windows until v651 releases in a few days. Apologies for the inconvenience.