Unable to reference anything in workspace with a local script

Thing is, the part is getting deleted from the client(at least thats what I think) as if I check from the server the part still exists. I don’t have a script that destroys or removes anything and this glitch seems to only affect certain parts. Streaming enabled is turned on.

Screenshot 2023-01-05 at 11.05.51 PM

local part = workspace.testpart
print(part)

error msg: test part is not a valid member of workspace

Yep, after turning on StreamingEnabled that appears to be the Issue

Try putting this line into a script

game.Workspace.FallenPartsDestroyHeight = -9999

I have a feeling that this happens because the part is too far down and falls into the void.

If streamingenabled is turned on AFAIK that means that it is likely too far away and is not being replicated as Roblox streams it away.

Is there any reason it has to be a Part? Can it be a folder?

Edit: StreamingEnabled works to make big games load faster by only loading nearby parts as far away parts are not likely to be seen by the player. I think you might have turned it on on purpose though so you probably know what it does. Just saying this for information sake.

1 Like

It would make no sense, since it exists in the server

You’re right, I just disabled streaming enabled and it works.

Turning streaming enabled off works now, could there possibly be an explanation on why only specific parts were being affected by this?

No, but what if it’s anchored beneath the FallenPartsDestroyHeight? That won’t delete it in Studio, but when its run, it’ll be deleted, no? Or am I misunderstanding entirely?

Yes, we are talking about why it errors, not why it disappears

Ah ok, then as you said, streaming enabled would do this.

Read my edit or put simply:

Far away parts are unloaded to save memory and computing power on the client as rhey cannot be seen by the player.

Correct me if I’m wrong but I think there might be an option to make certain parts always loaded. Don’t remember what it is called though.

1 Like

I think this page might help you Content Streaming | Roblox Creator Documentation

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.