The forum on this site is closed for new comments and posts. Continue the conversation in the new forum, and learn more here.

Getting a Gif to appear when you open your mouth?

  • Hi Rydumais!

    You can do this by using the BehaviorScript

    Then, in your project, you can add two BehaviorScripts. One to enable the sprite when the user opens their mouth, and one to disable it when they close their mouth:

    Make sure that the object is disabled in the Objects panel, unless you want the object to start off visible (since the Mouth Closed event isn't called when the Lens start). 

    Can't wait to see what your final Lens!



    Comment actions Permalink
  • Hey, I still haven't gotten it to work properly for some reason. Any other tips or could you possibly link me to a step by step process? Thanks!


    Comment actions Permalink
  • Hi Rydumais,

    Can you clarify what didn't work?

    To create a sprite to attach the mouth, in the Objects panel press: "Add New" > Face Sprite

    Then select the Sprite Binding 1 object in the Objects panel, and in the Inspector panel, set the Attach to Point to Mouth Center.

    Now that your sprite is attached to the mouth, we can add our gif to the sprite. Select the "Sprite 1" object, and in the Inspector panel, select the field next to Texture. In the pop up window, choose your gif. (You can import your gif into Lens Studio by dragging it from your computer's file explorer into the Resources panel). 


    Now we can have it appear and disappear by using the Behavior script. Download the Behavior Script from the page mentioned above, unzip it, then drag it into the Resources panel.

    Then we can create an empty object to add this script to. In the Objects panel, press Add New > Empty Object. 

    Then select that object, and in its Inspector panel, press Add New > Script. 

    In the new Script component, press "Add Script". In the pop up, choose Behavior Script.


    Finally, you can set it up as in the image above!


    Take a look at this sample project for an example.


    Let me know if you're still having issues.




    Comment actions Permalink
  • Hey Jon, 

    My gif starts to play even without opening the mouth for the first time. Then once when the mouth is opened, it works perfectly as applied. I want my gif to work only after opening the mouth and not immediately after activating it on the camera. Where did I go wrong? What should I do?

    Comment actions Permalink
  • Hi Nitika,

    If you select the texture in the Resources panel, in the Inspector panel, you should see a check box for "Auto Play". You can turn off this option if you don't want the gif to start playing automatically.



    Comment actions Permalink

We're here to help! We just need a little bit of information...

What system are you using?

Have you downloaded the latest version of Lens Studio?

Please download the latest version of Lens Studio. If you still run into this issue, please come back and report it!

Is this issue causing Lens Studio to crash?

What system do you run Lens Studio on?



Follow the next steps to help us solve your issue:

  • Copy and paste this text into your TerminalCommand Window
    open ~/Library/Preferences/Snap/Lens\ Studio/ %LOCALAPPDATA%\Snap\Lens Studio Copy Text
  • Press ReturnEnter to run the command. The Lens Studio folder will automatically open
  • Prepare to upload your files: zip the "Log" Folder by right-clicking and choosing "compress."
    Locate the Log.txt file right above it.

    Attach a screenshot of the issue:



What is this most relevant to?

Please enter a brief description of your issue:

Thanks for submitting this issue.

Unfortunately, it's likely due to the operating system or hardware you're using – since they don't meet the system requirements for Lens Studio.

Still, we hear you loud and clear, and are logging the issue in case there's ever a workaround we can provide!

Minimum Requirements

Operating System: Windows 10 (64 bit); MacOS 10.11+

Hardware: Minimum of Intel Core i3 2.5Ghz or AMD Phenom II 2.6Ghz with 4 GB RAM; Intel HD Graphics 4000 / Nvidia GeForce 710 / AMD Radeon HD 6450 or better; screen resolution of 1280x768 or higher

We'll try to resolve this issue as soon as possible. Thanks for letting us know about it!

Keep an eye out for a followup email from us. We may have a couple more questions for you, or we might already have a solution to offer.

Happy creating!