I’m making a game where the player can crouch. He has two collisions, one for the running animation and one for the crouching one, but for some reason, when he crouches, he doesn’t take damage, whereas when he runs, he does take damage.
Here is the player’s script
And here is the script of an object that hurts the player.
I don’t know what the problem is, please help!!
Can you post your code for changing collision shapes? Do you get any warnings?
Make sure to paste code, not screenshots.
Posting here so to be linked for later use instead of re-typing this every time
Make sure you paste scripts instead of screenshots. To properly format pasted code use three ticks ``` at the start and end of your paste like so:
```
# type or paste code here
func _ready() -> void:
print("My ready function!")
```
Results in:
# type or paste code here
func _ready() -> void:
print("My ready function!")
Press the </> button or ctrl+e in the forum to create these ticks.
[2024-09-02…
1 Like
Well, it works now, I don’t know how, but it’s fixed, thanks anyway!