✓ Accepted answer
Just create a Vector3Value and call it something like PlayerPosition and then do the following to set the value (and make sure the player variable is the player):
player:WaitForChild("PlayerPosition").Value = player.Character:WaitForChild("Torso").Position
If you actually want it to save the value, so you can use it again when you join another server (let's say, for example, to respawn in the same place you left off at), use Data Stores to save each sepearate axis value from the value of PlayerPosition or use Data Persistence to save the actual PlayerPosition value object or the object's value.
However, if you want to do it the way you're doing it, just use the x, y and z properties on Position, instead of adding .Vector3 after Position, like this:
player:WaitForChild("X").Value = player.Character:WaitForChild("Torso").Position.x
player:WaitForChild("Y").Value = player.Character:WaitForChild("Torso").Position.y
player:WaitForChild("Z").Value = player.Character:WaitForChild("Torso").Position.z
3 comments
Thank you. If I saved it to the value of Player Position, would it save as (0,0,0) for instance? and how would that be loaded back from the DataStore? Would it remain as (0,0,0)?
I just read on the Data Store wiki that you can save ROBLOX value types like Vector3, so you're going need a separate key for each axis by using player:WaitForChild("PlayerPosition").Value.x in your Data Store script when saving, with the .x at the end being your axis.
Thats my current solution. Thanks