[Studio Beta] Reference Instances Directly with Attributes

If you clone an Instance with InstanceHandle attributes, the clone will have all the InstanceHandle attributes set to nil. This should be fixed as fast as possible.

1 Like

It’s been known a while, I don’t think Instance Attributes are particularly high on this team’s list.

3 Likes

InstanceHandle feels incomplete. It seems like there should be an RBXScriptSignal property that notifies us when the instance is available/no longer available. Otherwise, we have to sit with :Wait() which throws a warning if it yields for too long, so you have to do some wacky stuff to avoid the warnings:

local instance
repeat
    instance = handle:Wait(5)
until instance ~= nil

On the contrary, being able to listen to the Changed event on an ObjectValue makes things a lot simpler.

local instance = objValue.Value or objValue.Changed:Wait()
3 Likes

Can’t you just do handle:Wait(math.huge)? I get it might be hacky but it looks cleaner than repeat until loop.

Haha, yes, that works. Pretty funny.
and bump to the cloning issue; needs to be fixed.

How have I missed this, this is amazing! The implementation of it too.

How can I make an empty instance handle?
I’m getting this error when trying to do-

InstanceHandle.new()
InstanceHandle.new requires an Instance argument

Edit: Oh, you have to explicitly pass nil.

InstanceHandle.new(nil)
1 Like

We will eventually support both, but for now you need to explicitly pass in nil.

2 Likes

Please.
It’s soon been a month and it’s basically ruining my development with instance attributes :frowning:

4 Likes

Will we also get type annotation support for require() calls from modules being stored in instance attributes, similar to ObjectValue.Value?

I’d expect that would require a fundamental change to how attribute types are determined, as far as I can remember GetAttribute returns any regardless of context.

I hope so. It would be really nice to have attribute store references to dependencies w/type support, so package management of reusable modules across games would be much easier.

2 Likes

Hi, do we have a timeline for when this will come to clients? A project of mine would benefit from using attributes over ObjectValues and we were hoping to begin bugtesting but cannot since our internal systems use Instance attributes as pointers. I’m okay converting to ObjectValues but then we’d end up converting back once attributes released so I was wondering when this would be pushed to production.

If anything, what about a timeline for pushing InstanceHandles to production? Their ability to be sent to clients even if an Instance hasn’t replicated yet is incredibly useful to me.

3 Likes

Hi folks! Thanks so much for the feedback. We know this is a highly requested feature and we appreciate your patience while we’ve been hard at work on a few fixes and improvements including:

  • Support for constructing an empty InstanceHandle
  • A fix for InstanceHandle attributes being nulled on clone, with an upcoming fix for a related issue affecting packages
  • Performance improvements

If your reported issue or concern is still occurring, or you’d like to signal boost it, please feel free to mention it again here so it doesn’t slip through the cracks.

Thanks again and please keep the feedback coming!

5 Likes

Please add intellisense/typing support for require() calls on modules being stored in attributes :folded_hands:

This would make referencing dependencies for reusable modules that are packages extremely easy, as all I need to do is update an attribute reference rather than having to modify the package or try to use ObjectValues in some convoluted way (can’t have them as children since modifying their reference will mark the package as modified, but changing an attribute directly on the module won’t).

2 Likes

now you’re gonna spam 500 instance handlers

basically still nothing changed

1 Like

ALRIGHT WHEN IS IT GOING TO STUDIO BETA?

It’s in studio beta right now, we need it to release.

oh wait i meant client beta, musta typed fast to the point i didnt have time to think, lol

When will this release into client beta?