Hi, I’m working on a system right now, where a tool is unlocked in a box using a key. Now to prevent players from getting the tool by touching it through the box, I rename the handle to something else. Then when the box is unlocked, I rename it to “Handle”. But for some reason I can’t pick it up.
I figured out that the reason why is probably because it doesn’t have a touch interest instance to it, or because it still thinks the handle doesn’t exist in the tool, so how would I recalibrate it and add a touch interest?
I made this topic because I have a feeling others need and I would have probably been stuck on this for a while.
You don’t need to change the name of the handle. I recommend making a separate part that acts as the collider for pickup. By default, you disable .CanCollide and .CanTouch on the collider part.
When you want the tool to be responsive to touch, you simply enable .CanTouch again.
Alternatively you attach a .Touched event to your handle and just have a a condition based on Handle.Name. The previously proposed solution is still a clean way to do this, too.