How can I make an object spawn using one button and have another button that makes it disappear
using this button code
local widget = require( "widget" ) -- Function to handle button events local function handleButtonEvent( event ) if ( "ended" == event.phase ) then print( "Button was pressed and released" ) end end local button = widget.newButton( { width = 100, height = 50, defaultFile = "images/pause.png", overFile = "images/pause.png", label = "", onEvent = handleButtonEvent } ) -- Center the button resume.x = 17 resume.y = 30 -- Change the button's label text button:setLabel( "Push" ) sceneGroup:insert(button)