Nice article, now I feel motivated to continue fleshing out my old custom animator I made months ago, will probably make a Class for it so it’s a lot easier to handle and if it works well, will probably open source it.
The way I handled replication is having a predefined table of animations with corresponding animation IDs. If a player is animating, tell the server what animation it is and fire that information to all the clients. The clients take the animation ID and run the animation locally for every player. I imagine Roblox does something similar to this since it avoids exploiters from tampering with the animations - in this way, any inappropriate players will be walled since the animations are predefined instead of sending CFrame data across the server.
To be clear, I’m still learning what replicates and what doesn’t - all I do is see if it replicates in studio and if it doesn’t, I know I have to do it manually myself. I have only worked with Motor6D and a simple loop - I didn’t know about TweenService at the time I made my animator and I didn’t like :lerp for being too linear. I’m still fairly new to the API but slowly chugging along
This definitely seems pretty cool to use in games, but wouldn’t it be inefficient if you’re using it for a lot of stuff? (Thanks for the article by the way, the way you explained it was simple and straight to the point).
All depends on how you’re replicating. Tweening all players might be a bit inefficient (assuming you haven’t removed the default animation scripts), but there are ways of getting around that, such as only tweening when players are in close proximity and using CFrame:lerp on far away players.
Speaking from my own experience, as long as you aren’t tweening on the server, everything should be fine. This is a major reason for why Strife is so laggy, the game sends your positional data to the server every time it changes, instead of telling the server when your goal is and having the server relay that to other clients for them to tween themselves.
Hi there, not sure what the problem here is… Seems like everything is work as intended.
If this is the problem (a weird initial keyframe), see if you’re setting savedbaseCframes before your idle animation plays. In general, I usually wait about two seconds after the player’s character has finished loading in before I apply everything.
(With animations playing) https://gyazo.com/3128b4cc384f7b820f4bd2931c49abb8
(Normal) https://gyazo.com/68d8a219c69555b33ba3d0e76d3697d0
I believe that animation track edits to the C0 take priority over tween service, though animation tracks make changes to the current C0 value (EX, rotate thirty degrees from the current point) versus setting from 0 (EX, set rotation to thirty degress). The stock roblox animations look off because this is re-rigged R6.
The reason my procedural idle isn’t completely overwritten is because I simply set the C0 instead of tweening it.
Yo, could I do this but without giving specific angles? I mean, can I just use keyframe sequences from RobloxStudio, sort of like what the animations contain? I wanna smoothly transition from one keyframe sequence to another.
If not, would I be able to get the keyframe sequence of each Motor6D using a function that loops through everything in the character and gets all the Motor6Ds in the character, and then sets a base CFrame(reset keyframe sequence), and then just subtracts from the final keyframe sequence to get the change? Like:
final keyframe sequence - reset keyframe sequence(base CFrame)
This would give me the CFrame relative to the base CFrame, and I can just use that CFrame and do:
I’ve been having trouble with this too, and this is what I’m trying. You can just create your keyframes in the animation editor, then save the C1 value of the M6D that’s being changed with the command bar. The animation editor doesn’t change the C0 value at all, only the C1 value. Then you can just tween the player’s C1 value to that. It works perfectly. It’s a little tedious, but I don’t know of any plugins to help with this.
Can you make a tutorial about springs in the character animations(not fps in any case), i mean’t as example if the player fell while he is falling the spring would make the camera go up/once he touchs the ground it bounces back. nice tutorial