Can't get cast to, to work

You got the concept of casting wrong and also expect the game to do magic for you.
How should the game know that with “get player and set the brightness” you mean "set the brightness on this specific light, which certainly is not an player)?

About casting

Any object has multiple types. Your Ford Mustang is of type “Mustang”. More generic, it is also an “Ford”. it is also a “car”. it is also an “object” (everything is an object).

Because the game engine usually works on the most common parent type (car instead of Mustang), you often end up with a situation that YOU know what type an variable is, but the game does not! And that’s the situation where Cast to is meant to be used.

Cast to does not fetch things, it is just a way to tell the game “hey, you might not know but this object here is actually also of type XX”.

The “get current car” function would return an “car” and not an “Mustang”, because you might change to an “Ferrari”.
Now here is the thing: You cannot call “get current car” on the sun. I think you agree, that an Ford Mustang is not a “Sun”.

Likewise, “get player character” is a value of type “Character”. You know it is a “Player_01”. if you want to do stuff that is specific to you, you now need to cast this value to “Player_01”. But the character is NOT a spotlight. By now you should realize that you cannot cast a player to a spotlight.

.

Which leads us to “But where can I get the spotlight which the user wants to use???”

There are multiple ways to solve this

One is: Use an collision actor in front of the light switch, which does “get player character” and sets a variable on it (eg “thing to use”). You then use this variable when the user presses the Use-key.

Another one is to use an line trace, which is an geometrical lookup of what the player looks at and which returns an array of results.

In the map “Blueprints_Advanced”, the last example on platform 2.5 has one about picking up items (by walking over them) and casting.
There is also an car driving tutorial, which does the “use car” with an collision actor