Teleport a player via StarterGui?

Hello!
I’m making a script where if you press a button, it’ll teleport a player (MoveTo) to a position using mouse. I’m wondering if you can teleport a player via StarterGui, more specifically, the script will be inside a frame. I tried to search on the forums, but I couldn’t find anything about my issue.

It shoudn’t matter too much where your script is located (Assuming localscript?), but usually if you’re handling Gui Input I would expect it’s location to be somewhat close to StarterGui. Yes, you’re completely fine with keeping your script under the frame.

It’s a local script, and thanks for the info!