How can I teleport the character to the cursor location?

I’m trying to create a event where the character teleport to the cursor location when I press the key “W”, but i can’t correctly get the cursor location, i tried this way, but doesn’t work properly.

How can I make that work?

This topic was opened 6 years ago without an answer. I assume you found a solution? I’m trying to create the same function, but without results and I can’t find anything similar for help from the forums, except from this post :smiley: