Problem with ObjectValue on a Life server

Hello
I have a very strange issue.
Inside a server side module I create an ObjectValue instance and set its Value to point to another object created inside the same module script.
Then I parent the ObjectValue under NPC model in the workspace.
Some time later I try to read the Value of this ObjectValue in another Server script.

This works fine in Studio, however on the Life server, I always get nil.

Does anyone have an idea what can be the reason for such issue?

Thanks in advance

Its probably a simple server-side error that occurs when roblox hosts a server. Join the game and press F9, you should see an error pop-up.
I guess that the script either doesnt create the objectValue or it simply cant add its Value.

No, there is no other error.
I prepared a very simple example showing the problem.
In an empty Baseplate, I create 2 scripts under ServerScriptService:

image

The content of Script:

local animation = Instance.new("Animation")
local objVal = Instance.new("ObjectValue")
objVal.Name = "MyObjVal"
objVal.Value = animation
objVal.Parent = workspace

The content of Script2:

task.wait(10)
print(workspace.MyObjVal.Value)

This works ok in Studio and prints “Animation”, but in life server prints “nil” .
Why?

Does anyone have an idea if this behavior is something related to security on life servers?
May be it is not possible an object parented under the workspace to point to another object visible only in a local script?
Or is this a bug?

Set a parent to animation.

Also what do you mean by life server. Like a roblox hosted server?