Share Posted February 21 Hi, I've been having an issue with this error ("Uncaught TypeError: t[0] is undefined"), whenever I try to use motionPath and give it a value of an object with multiple values in it, it gives me that error, and I've been trying to solve it for so long with no use. I tried gsap.registerPlugin, I tried importing instead of CDN, I tried different syntax, all with no use. Please help, I've been at this for so long. Should also mention that the error keeps getting spammed, goes up to 90 times sometimes, but it's repeats anyways. Here's the code: Javascript: CSS: HTML: Here's the error itself: Link to comment Share on other sites More sharing options...
Solution Solution Share Posted February 21 Welcome to the forums, @BrooklynTboi. A few things... You definitely shouldn't be using ScrollMagic. That's very old and is not a GreenSock product and doesn't work with the modern GSAP 3. I'd strongly recommend switching to ScrollTrigger which is far more capable. This doesn't make much sense and is problematic: tl.add( tl.to(...) ) That's literally trying to add a timeline as a child to ITSELF I'm not sure what you were trying to do there, but you could probably just delete the tl.add(...) wrapper. The values of your motionPath should be an Array with multiple values. It doesn't make much sense to plot a curved path through one point I'd strongly recommend using the modern GSAP 3 syntax, like string-based eases. // OLD ease: Power1.easeInOut // NEW ease: "power1.inOut" See If you still need some help, please provide a minimal demo (like in CodePen or CodeSandbox) and we'd be happy to answer any GSAP-specific questions. Link to comment Share on other sites More sharing options...
Author Share Posted February 21 Ah.. thanks a lot, I've been reading old documents without realizing they were old, but yea I did all of that, and eventually it fixed the problem.. Thanks a million 😁. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now