How do you make a prop device disappear with verse after interaction with it?

I have an array of button devises that i want to disappear when interacted with. Im struggling with geting them to disappear.

When theres an interaction it gets to Print("End") but doesnt do anything


using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /UnrealEngine.com/Temporary/Diagnostics }

button_container:=class(){
    Device : apple_hide
    OurButton : button_device

    OnAgentInteracted(InAgent:agent):void=
        Device.OnButtonInteracted(OurButton)
}

apple_hide := class(creative_device):
    @editable
    OurButtons:[]button_device=array{}

    OnBegin<override>()<suspends>:void=
        Print("Begun")
        InitalizeSubscriptions()
        Print("Subscribed")

    InitalizeSubscriptions():void=
        Print("Intitilaized subscription")
        for(L_Button:OurButtons):
            L_Button.InteractedWithEvent.Subscribe(button_container{Device:=Self,OurButton:=L_Button}.OnAgentInteracted)

    OnButtonInteracted(InButton:button_device):void=
        Print("interation")
        L_PropTransform:=InButton.GetTransform()
        L_PropHideTransform:= transform{Scale:=L_PropTransform.Scale,Rotation:=L_PropTransform.Rotation,Translation:=vector3{X:= L_PropTransform.Translation.X, Y:= L_PropTransform.Translation.Y, Z:= L_PropTransform.Translation.Z-900000.0}}
        if(InButton.TeleportTo[L_PropHideTransform]){}
        Print("End")

You code is correct. You just need to subtract using a number smaller than 900000.0. I tried 900.0 and it worked fine.

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