Problem with ObjectValue on a Life server

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:


The content of Script:

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

The content of Script2:


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

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?