Issue with object value replication

Hey, I’m having some object values inside some of my GUI buttons. Each object value has a value of the relevant frame that the button should open/close. But initially, the GUI is in StarterGui, And then it gets replicated to PlayerGui as usual. But when it gets replicated the object value won’t hold the relevant frame instance from PlayerGui but it still holds the given frame instance from StarterGui. But I want the Target object value to hold the relevant frame in PlayerGui other than the StarterGui. Does anyone know a potential fix for this issue?

Any help or ideas are greatly appreciated :slight_smile:

Perhaps a new localscript under the Codes frame, and retrieve the PlayerGui copy of the Codes button, and set the Target.Value from there?

I could do that but, I kinda wanna tackle this issue the way I asked for. Cause I mainly wanna do this automatically and not use manual ways! Thanks for the reply though :slight_smile: