Should I Use CollectionService to Ignore Equipped Item Models when Raycasting?

In short, I don’t want equipped item models to interfere with the interaction Raycast.
I thought about using CollectionService to tag those items when equipped, and untag them when dropped, but I’m not sure if that’s the efficient way to do that.

Thanks for reading :slight_smile:

2 Likes

You can do that, it would be the same as creating a table and inserting/removing the item from there.
And for raycasting the mouse you would use RaycastParams and exclude the table.

1 Like

That’s what I thought, just made sure, thank you!
However, I do wanna ask, does tagging items keep them tagged in Studio?

1 Like

Also, if we’re speaking about ignoring a tool or any model that’s parented to Character, you can just Exclude the character and you won’t have much of a hassle.

1 Like

Damn, that’s actually better lol, thanks again

1 Like

They will be tagged throughout the play test* if you do it by code mid-game.
If that’s your question then after finishing the play test it resets.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.