"my logic is damn stupid."

animatorTest.rbxm (103.5 KB)
My code plays the animation through Motor6D. I tried to type everything for your convenience (See the Types module). If you don’t see the animation, add more expectation to the script inside Rig. Most likely there is a problem with the client’s download speed
What am I not happy with? The problem is that literally every second person who “fumbles” in scripting and at least has something to do with this topic says that - I quote “ur logic is damn stupid”

Rather, I mean, the problem is code optimization. In many parts you will see O(n) or maybe even O(n*n) (if I’m not mistaken). And for animation, in my case, proper optimization is very important. I tried to make it, really. This is indicated by at least an attempt to create a binary search type, etc. however, I am still almost sure that the code is far from perfect and far from readable.

How do I want to improve the code? I need to find ways to get rid of for for for for for for for… I want to know how I can “in principle” improve the logic of the script and so on. I will be glad of any help, criticism and attempt to help

5 Likes

Everyone who reads this likes the post. But no one even downloaded the script file or helped me🥺

1 Like

Could you maybe send the code or send it as a lua file instead of rxbm? So that i can read it on Mobile.

1 Like

Oh, okey, wait a second…
Types.txt (1.3 KB)
Animator.lua.txt (5.4 KB)
AnimationTrack.lua.txt (6.4 KB)

Types is a export types

I have not sent some minor modules here.
By the way. I saw your cool module for particles, rlly cool