Smething is wrong with the is_in_group as it dosent pop up in the auto completion window and doesnt work in game.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ReadKey

func damage():
if ground_check.is_colliding():
var idk = ground_check.get_collider()
if idk.is_in_group(“body”):
health.current -= 20

:bust_in_silhouette: Reply From: Inces

It doesn’t autocomplete, because compiller doesn’t know what class it is from your code. Collider can be any class and Editor will not automatically assume, that it is a class inheriting from Node. This is not a problem and not a cause of your issue. You need to debug it by printing - print if collision, print collider, print get_groups, print health, and so on.

Byt he way, if You want to help compiller assume what class are You referring to and help it autocomplete, You can use AS keyword :

var idk = groundcheck.getcollider() as RigidBody