How do I retrieve a string value of a custom property from object A to a variable from a Lua script?. The documentation seems to not give us a lot of information. I try to copy & paste the reference from Object A to the script, but I have a nil value when I try to print the result. I already enable networking on both objects, plus I also enable the Dynamic custom property, but nothing works.
What I am doing wrong?
Welcome to the forum
In order to gain access to the custom property of Object A in another script, you would have to add Object A as a Custom Property to that specific script (Select the script, and drag Object A to the bottom of the properties window). From there you would do something like this:
local ObjectARef = script:GetCustomProperty("ObjectA"):WaitForObject()
local StringValue = ObjectARef:GetCustomProperty("StringValue")
I hope this solves your problem. Let me know if you need any more help