Unable to call a class name (GDScript)

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

i’m trying to do is reuse the code i made for a minigame with levers which worked, where basically the levers have a specific class (Interactable) and if the raycast detects that specific class somethig can be triggered, i simply took the code and nodes and i was trying to reuse it for a kill interaction in multiplayer and the only thing i did is renaming the class and the variables, i also have another part of the code in the other player where it’s class is being set to “Killable” but it gives a weird error it didn’t give me with the levers even if i’m doing the same thing, here’s the images:

Player 1 code 1/2

Player 1 code 2/2

:bust_in_silhouette: Reply From: Fazel87

Hi
I also encountered this problem several times.
Be sure to create the class in a separate file
Sometimes the problem is solved by restarting Godot once.

I already restarted but i had no luck :frowning: what do you mean to create the class in another file? i think it’s already in a different script

Amose05 | 2023-03-22 17:33