Server -> Client Part Error On Newer Experiences

When passing a part reference from the server to the client, the part is not immediately available on the client and will output nil. This isn’t an issue on older experiences, though I don’t have any idea of the timeframe this started happening, I can use experiences from 2 years ago and it will not pass nil to the client.

This issue only occurs if you create a new place past a certain date within the last 2 years. A copy of a place where the bug doesn’t occur will not have this issue even when created today.

Example of it happening:
https://gyazo.com/1e19de530a4d735e29c481cd9206c1a9

Example of it not happening:
https://gyazo.com/ee146efcfe3e5ab2cced0e13a9ff7b7b

I am using the exact same code for each place that being:

Server:

while task.wait(1) do
	local newPart = Instance.new("Part")
	newPart.Parent = workspace
	game:GetService("ReplicatedStorage").Part:FireAllClients(newPart)
end

Client:

game:GetService("ReplicatedStorage").Part.OnClientEvent:Connect(function(part)
	print(part)
end)

By any chance do you have Streaming Enabled (Instance streaming | Documentation - Roblox Creator Hub) turned on? It’s automatically enabled for newly-made places but wasn’t forced for older ones.

If so, parts do not immediately replicate to the client or may not exist until the region is streamed. You can read the link above for more information on Streaming Enabled.

You’re totally right man that’s completely my bad LOL. Never knew streaming enabled slowed the replication of new parts

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