--Smack the Pinata function InitRioPinata() print("left in pinata init - needed?") end function CreateRioPinata(myId) --note:-change this func to adjust pinata parameters -- (myID, , ) Object.CreateScriptDanglingTarget(myId, 3.5, 1) return coroutine.create(UpdateRioPinata) end function UpdateRioPinata(myID) local dt=0 local reason=0 Object.SetUpdateRate(myID, 0.1) while true do Object.UpdateOnReceiveMessage(myID,true) dt, reason = coroutine.yield() if reason == 13 then --our pinata is no more print("Guys - hope you can use this works") Object.SetDestroyed(myID,Object.GetLastTouchfieldDriver(myID)) end end end