-
What do you want to achieve? Keep it simple and clear!
I would like to make a system that checks if a player hit a wall after they received heavy knockback similar to Soulshatters and Deepwoken
-
What is the issue? Include screenshots / videos if possible!
Everything i have tried so far has resulted in a bad or not working script.
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I havent really been able to find anything helpful to anwser, ive tried checking for collisions on the players torso and checking collisions for every wall but it just wont work correctly
If you have any posts or ways you know around doing this please comment them!
1 Like
Try using raycast. So whenever they get attacked do a raycast from the characters position a little bit backwards. Although this could easily have bugs because the knockback could be random. If you somehow make the knockback consistent by maybe using tweens it would work perfectly.
2 Likes
While that would let me detect IF a player is going to hit a wall how would i know when theyre going to hit it so i can play the animations and particles accordingly?
On second tought i think i already figured out how id go around doing it, thanks!
1 Like
Just curious how did you get around it???
Thinking about casting multiple rays over the span of the time the players being knocked back and if one of the walls a ray hit is like 2 or 1 studs away from the humanoidrootpart that should mean the wall has been hit
1 Like
Update:How i actually did it is just casted a ray from the ENEMIES humanoid root part back that is like 2 studs long and checked for any walls hit by just seeing if theres a raycast result in general, works like a charm
1 Like