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
 

Save Model Positions?

Previous Thread :: Next Thread 
ReynnSolaris is not online. ReynnSolaris
Joined: 16 Jun 2013
Total Posts: 1345
16 Jun 2016 03:06 PM
How would i make it so i can save a players base that they placed, into Datastore?


Report Abuse
Soybeen is online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
16 Jun 2016 03:07 PM
I would save the CFrame of the PrimaryPart so that you can easily just Model:SetPrimaryPartCFrame() it back


Report Abuse
ReynnSolaris is not online. ReynnSolaris
Joined: 16 Jun 2013
Total Posts: 1345
16 Jun 2016 03:08 PM
I tried, but when i saved the CFrame, it told me DStores cant hold Dictionaries.


Report Abuse
BanTech is not online. BanTech
Joined: 31 Dec 2015
Total Posts: 886
16 Jun 2016 03:18 PM
You can't save the actual CFrame construct, but you can save individual values to recreate the CFrame later. Try creating a table of the CFrame's components
Report Abuse
ReynnSolaris is not online. ReynnSolaris
Joined: 16 Jun 2013
Total Posts: 1345
16 Jun 2016 03:47 PM
similar to this?

PlayerData.PlacedItems[Item.Name.."0"] = PlayerData.PlacedItems[Item.Name.."0"] or {}
PlayerData.PlacedItems[Item.Name.."0"]["X"] = PlayerData.PlacedItems[Item.Name]["X"] or 0
PlayerData.PlacedItems[Item.Name.."0"]["Y"] = PlayerData.PlacedItems[Item.Name]["Y"] or 0
PlayerData.PlacedItems[Item.Name.."0"]["Z"] = PlayerData.PlacedItems[Item.Name]["Z"] or 0
PlayerData.PlacedItems[Item.Name.."0"]["R"] = PlayerData.PlacedItems[Item.Name]["R"] or 0
??


Report Abuse
BanTech is not online. BanTech
Joined: 31 Dec 2015
Total Posts: 886
16 Jun 2016 03:52 PM
That's one way to do it. You'll need more than just R for the rotation though. Remember that CFrames use 12 values.

CFrame.new(x, y, z, R00, R01, R02, R10, R11, R12, R20, R21, R22)
Report Abuse
ray_1 is not online. ray_1
Joined: 18 Feb 2011
Total Posts: 464
16 Jun 2016 03:53 PM
transform the cframe into quaternion form so there will only be 7 values


Recommended username: GullibleRay_1


Report Abuse
ReynnSolaris is not online. ReynnSolaris
Joined: 16 Jun 2013
Total Posts: 1345
16 Jun 2016 04:10 PM
i.e? example would be nice sorry im not that all intelligent :P


Report Abuse
ReynnSolaris is not online. ReynnSolaris
Joined: 16 Jun 2013
Total Posts: 1345
16 Jun 2016 04:30 PM
b


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