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)