How to get players position on doclick?

Hi I am wondering how to get a players positions as soon as he/she presses a dbutton. I am not wanting to continusly get his/hers location but just the location where they were when they pressed the dbutton. How would I do that. Here is the code I got.



	button.DoClick = function()
            playerpos = ? 
	end


gui.MousePos

Be aware it returns 2 values ( the x and y position )

I think you misread me. I meant the location in the 3D world. Not their mouse location.

I guess they mean the literal position of the player, as of

Entity:GetPos

[editline]12th August 2017[/editline]

Ninja’d

Yeah but how do I get the ent that pressed the button

If uppon pressing the button, the action you want the player to make should influence something serverside/on other players, you should use the Net library
If you just want to store the information on the client that presses the button, then use

LocalPlayer

GetPos Is shared, there’s no need of networking it

I said the thing about networking for the server to get the pos of the client, not for the client to send a vector which any script kiddie can “hack” if they find the source code

Definitely did, apologies