How to get a property through an object value

hello! I am currently trying to make a script that can find a property (specifically TimePosition) through an object value.

script.AnimTimePosition.Value = script.CurrentAnim.Value.TimePosition -- gives error

is TimePosition an attribute of ā€œValueā€?

If yes, use GetAttribute

What exactly are you trying to do, also whats the error. Also, I’m not sure if this is why but try:

script.AnimTimePosition.Value = script.CurrentAnim.TimePosition.Value 

as you mentioned Value before TimePosition

What’s the error? You haven’t provided any details.
if script.CurrentAnim.Value then
Make sure CurrentAnim.Value isn’t ā€˜nil’.

1 Like

I recently figured out a work around in this code. Thanks for the help though!

1 Like