generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Saving player location after quit

Previous Thread :: Next Thread 
BoItUzumaki is not online. BoItUzumaki
Joined: 14 Jun 2015
Total Posts: 366
04 Feb 2017 04:27 PM
I want to know if is it possible to save a player's position after he quits and rejoins the game


Report Abuse
Naco88 is not online. Naco88
Joined: 30 Oct 2009
Total Posts: 665
04 Feb 2017 04:28 PM
It's definitely possible yes.

Just look up saving an x, y and z value for a player when say they press a save button.


Report Abuse
KritikalGunzz is not online. KritikalGunzz
Joined: 10 Nov 2013
Total Posts: 1633
04 Feb 2017 04:30 PM
I would save the Vector3 position every 10 seconds since (I think) you cannot access the position of the character when he is leaving.

Save the individual component of the vector3 position since (correct me on this) you cant save a Vector3 to datastores
Report Abuse
BoItUzumaki is not online. BoItUzumaki
Joined: 14 Jun 2015
Total Posts: 366
05 Feb 2017 06:19 AM
I'm not really good in scripting how should I do that ?


Report Abuse
BoItUzumaki is not online. BoItUzumaki
Joined: 14 Jun 2015
Total Posts: 366
05 Feb 2017 06:54 AM
bump


Report Abuse
Naco88 is not online. Naco88
Joined: 30 Oct 2009
Total Posts: 665
05 Feb 2017 06:56 AM
learn :)))

http://wiki.roblox.com/index.php?title=API:Vector3
http://wiki.roblox.com/index.php?title=Saving_Player_Data


Report Abuse
BoItUzumaki is not online. BoItUzumaki
Joined: 14 Jun 2015
Total Posts: 366
05 Feb 2017 06:58 AM
Thanks !


Report Abuse
Naco88 is not online. Naco88
Joined: 30 Oct 2009
Total Posts: 665
05 Feb 2017 07:03 AM
If you've never scripted before i wouldn't jump straight into it.

Look at the beginners tutorials on the wiki.

When learning, I had coded a lot before but the wiki tutorials helped me understand it in a day.

:)))


Report Abuse
BoItUzumaki is not online. BoItUzumaki
Joined: 14 Jun 2015
Total Posts: 366
02 Jun 2017 11:54 AM
bump
Report Abuse
nullfeels is not online. nullfeels
Joined: 31 Mar 2017
Total Posts: 1215
02 Jun 2017 11:55 AM
Umm what happened to the script I created you to do this the other day?
Report Abuse
BoItUzumaki is not online. BoItUzumaki
Joined: 14 Jun 2015
Total Posts: 366
02 Jun 2017 11:57 AM
I didn't try it yet xD w8 brb
Report Abuse
BoItUzumaki is not online. BoItUzumaki
Joined: 14 Jun 2015
Total Posts: 366
02 Jun 2017 12:02 PM
bump, it doens't work...
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
02 Jun 2017 12:05 PM
dont save a vector3
save a table or string containing the data u need and then convert it back into wat u need
Report Abuse
nullfeels is not online. nullfeels
Joined: 31 Mar 2017
Total Posts: 1215
02 Jun 2017 12:08 PM
I created him a script the other day to do this. It works fine in a blank project for me, but he says it causes his leaderboard and tools to disappear. Maybe someone will know why. Here is the code. goo.gl/XszgxI
Report Abuse
TakeALookInTheMirror is not online. TakeALookInTheMirror
Joined: 25 Dec 2011
Total Posts: 16463
02 Jun 2017 12:09 PM
why not save a Vector3

does it have issues


Report Abuse
nullfeels is not online. nullfeels
Joined: 31 Mar 2017
Total Posts: 1215
02 Jun 2017 12:10 PM
P.S. I'm having him put it in the ServerScriptService
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
02 Jun 2017 12:10 PM
because u cant save a userdata, it doesnt exist in JSON
in JSON u can only have arrays, dictionaries, strings, booleans, numbers
anything that is not of that type cannot be encoded into JSON and sent to be saved
Report Abuse
Milenveliki is not online. Milenveliki
Joined: 14 Aug 2013
Total Posts: 1097
02 Jun 2017 12:29 PM
pastebin*com/Q7rYbv9V
Report Abuse
BoItUzumaki is not online. BoItUzumaki
Joined: 14 Jun 2015
Total Posts: 366
02 Jun 2017 12:30 PM
I will try it and tell you if it works.
Report Abuse
Xtmate_Roblox is online. Xtmate_Roblox
Joined: 18 Dec 2016
Total Posts: 71
02 Jun 2017 12:31 PM
Ok, i know how to script but i am not too sure about this topic.
I do know there are save buttons in the toolbox, just look it up in models section. They definitely save location and leaderboard stats if u have any.
Report Abuse
Milenveliki is not online. Milenveliki
Joined: 14 Aug 2013
Total Posts: 1097
02 Jun 2017 12:32 PM
it should work
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
02 Jun 2017 12:34 PM
heres a couple of examples of converting

print( tostring(Vector3.new()) ) --string version
print( Vector3.new(("0, 0, 0"):match("(.-), (.-), (.+)")) )--back


local vector = Vector3.new()
print( {x=vector.X, y=vector.Y, z=vector.Z} ) --table version 1

local tbl = {x=0, y=0, z=0}
print( Vector3.new(tbl.x, tbl.y, tbl.z) ) --back


local vector = Vector3.new()
print( {vector.X, vector.Y, vector.Z} ) --table version 2

local tbl = {0, 0, 0}
print( Vector3.new(unpack(tbl)) ) --back

..etc
Report Abuse
Milenveliki is not online. Milenveliki
Joined: 14 Aug 2013
Total Posts: 1097
02 Jun 2017 12:34 PM
Just put teh code in a new Script in ServerScriptService/Workspace
Report Abuse
BoItUzumaki is not online. BoItUzumaki
Joined: 14 Jun 2015
Total Posts: 366
02 Jun 2017 12:38 PM
I tried it but I fell from the map and the leaderboard + tools aren't in.
Report Abuse
Milenveliki is not online. Milenveliki
Joined: 14 Aug 2013
Total Posts: 1097
02 Jun 2017 12:39 PM
Try meh script in a new Place
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image