Hello! i’m doing Trident for my game. I already scripted throwing, hitting player and etc. But i don’t know how can i make loyalty system like in Minecraft trident. I’ll use BodyForce for doing loyalty system
Minecraft trident loyalty system:
So i don’t know how can i move BodyForce to player’s Right Arm position.
Really you could do basically like a tween, take the last position of the player’s right arm, then tween (or whatever you want to do) and just move the trident back to that position. Or you could mess around with constraints, and attach it to the trident and right arm. That would allow you to pull both together, (I believe it’s a cylinder that would be most useful.)
You should use VectorForce instead it say BodyForce is depreciated. If you use VectorForce you can use a script that attaches an attachment to the player and the trident. Then link them to the VectorForce. Final you can use a touched event to detect when the trident has hit the ground and when the. add acceleration to the VectorForce to retract the trident
I agree with @Mashmello_06. Using VectorForce or BodyForce can cause the trident to get stuck on the way behind some other part. Either you can use Tweens or still use VectorForce but disable collisions for the trident.
The nice thing about Tweens though is that they are perfectly predictable. Forces can be disturbed by random noise in your game, making the trident go the wrong way or get stuck. Tweens don’t have this problem, since all they do is interpolation between two states (from position A to B).