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 » Game Design
Home Search
 

Re: How would I make this save script?

Previous Thread :: Next Thread 
axelvts is not online. axelvts
Joined: 27 Apr 2008
Total Posts: 3029
04 Oct 2015 08:28 PM
Mkay, I'd like to make a save script similar to the one in this game:
http://www.roblox.com/games/190430249/Dreams-of-Greatness-Alpha-WIP


In the game above, if you die- your stats reset and you loose everything (same thing if you combat log)- I'd like to make a game where your Exp raises for every player/ NPC you kill, and you get a large deduction from your stats if you die or combat log (like 5 level deductions). If you went to LVL 0 (or lower)- you'd just stay at 0 until you got one kill.

I'd also like player position to be saved until death aswell- the X,Y,Z coords would be saved much like in Appoc. Rising/ Dreams of Greatness- and you'd spawn in that location providing you didn't die/ combat log.


--- Thanks for reading and helping me out in advance. ---


If you want something to work off of and not do it by scratch:

[[[-----]]]

local ds = game:GetService("DataStoreService"):GetDataStore("Config")

game.Players.PlayerAdded:connect(function(p)
coroutine.resume(coroutine.create(function()
local Config = script.Config:Clone()
Config.Parent = p
p:WaitForDataReady()
local child=Config:GetChildren()
for i=1, #child do
child[i].Value=ds:GetAsync(p.userId.."-"..child[i].Name)
end
end))
end)

game.Players.PlayerRemoving:connect(function(p)
coroutine.resume(coroutine.create(function()
local child=p.Config:GetChildren()
for i=1, #child do
ds:SetAsync(p.userId.."-"..child[i].Name,child[i].Value)
end
end))

[[[-----]]]

I got this from some dude awhile back, it works with a configuration and values under the Config in the SSS.

He never told me how to change the values through other scripts for players, because we lost contact and I'm not sure which Skype contact he is.
Report Abuse
chrismac724 is not online. chrismac724
Joined: 08 Nov 2014
Total Posts: 217
04 Oct 2015 08:58 PM
for what you need done your going to need a more complex script than that, if not more scripts.
Report Abuse
axelvts is not online. axelvts
Joined: 27 Apr 2008
Total Posts: 3029
05 Oct 2015 04:59 AM
Not really- I just don't know how to go about it if I want it to be saved on this type of data store.
Report Abuse
DataZone is not online. DataZone
Joined: 26 Jan 2014
Total Posts: 1497
05 Oct 2015 05:28 AM
First of all, don't say "Mkay", it's completely unnecessary!

R$1,008
Report Abuse
axelvts is not online. axelvts
Joined: 27 Apr 2008
Total Posts: 3029
05 Oct 2015 03:10 PM
I'm sorry- I like to type how I talk, while staying as true as I can to proper English (American) grammar.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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