I’m working on creating some death effects, though I’m a little confused about the best way to approach it.
For example, if I had a death effect where multiple knives spawn around the player and each one flies into the player’s torso, would the best method be using animations, TweenService, lerping, or perhaps something else I’m not aware of?
Or, say, a giant hammer that appears behind the player and slams down on them?
To clarify, I’m referring to moving the actual parts or weapons themselves, not the animations of the player reacting to being hit.
it really depends on the kind of feel you’re going for. If you want smooth, clean motion, TweenService is great — you can tween the knives from a circle around the player straight into their torso with nice easing. If you want more control (like curving motions or spirals), manually lerping in RunService gives you full flexibility. For something like a hammer slam, physics-based options like VectorForce or BodyVelocity add weight and realism, especially if you pair it with some screen shake, particles, and sound. You can even animate the whole thing using a dummy rig if the motion is complex or reused often. Honestly, mixing a couple of these methods can go a long way — for example, tween into position and then use physics to sell the impact.
TweenService is very preformant heavy though correct? Having to tween multiple knives could be very bad? Especially if multiple people were using the same effect? For example 8 knives that spawn in, 8 tweens, say 5 people use it at once, that’s 40 tweens at one time?
40 tweens (8 knives per player × 5 players) sounds like a lot in theory, but unless you’re tweening high-fidelity models with like 20 moving parts each, it’s generally fine. Roblox games use way more tweens for UI, cutscenes, and effects all the time. The engine’s pretty optimized for it…especially if your tweens are short (like 0.5 to 1.5 seconds max).
If you still wanna be extra careful or scale up later:
Cache your tweens if they’re reused often (helps avoid overhead).
Use TweenService:Create() once and play it instead of creating it every frame.
Consider grouping motion — like tweening the knife’s primary part and welding the rest.
If you want super lightweight behavior, RunService.Heartbeat lerping gives you full control.
anyways it shouldn’t be a issue at all! if you start scaling this up to dozens of effects running constantly or you notice stutter on low-end devices, you can always switch to lerping or physics-based solutions.
it really depends on which death effect you’re going for.
if you are wanting to do the hammer and you are good enough at animating, I highly suggest you animate the hammer by welding a Motor6D to the RootPart, then have a separate rig to animate itself there.
if you want to do the knives falling from the sky, you could use Tweening according to @aroloxia, but I still might recommend animating them because of you being able to add extra effects, like the knife sticking to the body correctly. this is very good because if you plan on moving the player through the animation, then you can make the knives follow accordingly.
I can provide further details if necessary
I just realized that animating was already mentioned. I just need to emphasize that it’s a great option
I’m unfamiliar with physics-based animations, or whatever the terminology is called, but when you say this, would it just be a case of literally using BodyVelocitys/VectorForce to throw the hammer into the ground? How does a tween work hand in hand with a force object?
When it comes to performance, do you know how much more performant animations are over tweens?
I am unfamiliar with the resources of animations over tweening, but one thing’s for sure, using animations do not use plenty of resources. matter of fact, there’s a built-in “fail-safe” if you will where if about a 100+ animations are playing, new animations will not play.
If the death effect acts like a cutscene, I suggest using animations. You have control over how it looks, but scripting it can give you more control if you want it to be simple.
I do not recommend physics, as physics can look very choppy. However, you could do physics but make the network owner of the part of the client. So the physics calculations are done on the client only. Or send an event to all clients which respectively create the part instance and physics , etc.
Before I mark this topic as solved, my final question is:
If I have an object that followed the characters position at an offset, how would I then activate a tween on that object so that it still changes all its properties while still being attached to the character at an offset?