What would be the best way to implement character reaction to being shot

I am currently making a gun system, and I wanted to implement a flinching system so that when you are shot your character flinches in the direction where you were hit.

I know the easiest solution would be using animations but I would like to use CFraming to make it more dynamic

Nico’s Nextbots actually has what I want to achieve:
flinch

I could be wrong about it being flinching, I apologize if it is wrong

1 Like

The easiest way would be getting the part that was hit (like the left shoulder, right shoulder etc.) and if it’s one of them then move the character in some way, not sure how to do that tho, sorry

I’m not really sure. I don’t even think it’s necessary because I don’t think this happens in real life.

I do know it involves complex math though, but SpringService is the best option for springing the character back.

It does, if you would shot someone on the left shoulder they would ‘rotate’ on the left side and go a little back, unless they are really heavy for some reason

That only happens in the movies for a cheap effect. Just add some sounds and call it a day.

Anyways, I think that you could achieve this with 2 animations that you blend together for right and left.

The thing is that he doesnt the want to use animations, instead something like CFrames

Also, I never got shot myself so I can’t talk from experience (hopefully you can’t either), but from my medium understanding of phisics thecnically it should happen, maybe not being too much of an effect, probably in movies is very amplified, but depending on the weapon it might also cause the effect, I’m not sure tho, I’ll do some research

I prefer having the character react to being shot since it looks better than the bullet just damaging them, I am not worried about how realistic it is.

1 Like

I don’t know why you would want that, but you could just tween the head & torso weld’s C1 orientation back a little.

I know to use the head and torso’s weld and change its orientation, I’m just looking for how to make it dynamic so that for example if I shot a player from behind them their head would point downwards kinda like this:
image
The yellow arrow is where the bullet is coming from

Okay, then you would raycast, get the face of the object, get the object, and apply some knock back to it, I don’t have a code and I don’t have any idea of how to do that, sorry

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.