How can I call a function inside the gamemode from the character in blueprint?

Every time I cast to the Gamemode and then call the function, the cast fails, what’s happening?

Hi,

Did you set your custom game mode in the world settings ?

Yeah I set it, the gamemode is running all it’s code fine, casting just doesn’t seem to be working properly…

It weird… Do you load new map during the map ? And also does the cast fail everywhere ?

I don’t load a new map, and I think the cast fails everywhere, but what do you mean by that? It fails every time I call it

After doing some tests, it seems like casting to anything isn’t working properly, and I can’t get it to work with interfaces either. All I’m trying to do is move the character to a different place when a function inside of the gamemode is called, also when some actors spawn other actors I need those to be added to an array in the gamemode, but the cast never goes through when I try to do either of those. The picture is all the different methods I’ve tried for the player respawning