|
| 28 Mar 2016 10:19 PM |
Can you save like 5 values to one datastore or do u need more then one...
local DSservice = game:GetService("DataStoreService")
local DataStore = DSservice:GetDataStore("SimpleSave")--im talking these
game.Players.PlayerAdded:connect(function(player) local YourAPro = DataStore:GetAsync(tostring(player.UserId)) if YourAPro then print(player.Name..' Is back for seconds ~ '..player.UserId) print(YourAPro) else print(player.Name..' Is in for a big surprise') DataStore:SetAsync(tostring(player.UserId),'-User') end end) |
|
|
| Report Abuse |
|
|
| |
|
c9_io
|
  |
| Joined: 15 Feb 2014 |
| Total Posts: 2642 |
|
|
| 28 Mar 2016 10:24 PM |
| Off topic but I like your desc I'll just input all my trig equations here he he hehe |
|
|
| Report Abuse |
|
|
|
| 28 Mar 2016 10:27 PM |
@Flat well this is my full* script: (How would I save all of these..?)
local DSservice = game:GetService("DataStoreService") local DataStore = DSservice:GetDataStore("SimpleSave") game.Players.PlayerAdded:connect(function(player) local YourAPro = DataStore:GetAsync(tostring(player.UserId)) if YourAPro then print(player.Name..' Is back for seconds ~ '..player.UserId) print(YourAPro) else print(player.Name..' Is in for a big surprise') DataStore:SetAsync(tostring(player.UserId),'-User') end local top = Instance.new("Folder", game:GetService('ServerStorage')) top.Name = player.Name..player.userId
local stats = Instance.new("IntValue", top) stats.Name = "leaderstats"
local no = Instance.new("Folder", top) no.Name = "Settings"
local yo = Instance.new("IntValue", no)--hello, done yo.Name = "Speed"
local yoo = Instance.new("IntValue", no)--hello, don yoo.Name = "Health"
local ypp = Instance.new("IntValue", no)--hello ypp.Name = "PresetSpeed"
local yp = Instance.new("IntValue", no)--hello yp.Name = "PresetHealth"
local Points = Instance.new("IntValue" , stats) -- done Points.Name = "Points"
local rk = Instance.new("IntValue" , stats) -- done rk.Name = "Rank"
local xp = Instance.new("IntValue" , stats) --done xp.Name = "Experience"
local nerd = Instance.new("IntValue" , player) --fake sht ehhh nerd.Name = "leaderstats"
local nerd1 = Instance.new("IntValue" , nerd) --fake sht ehhh nerd1.Name = "Lvl"
local nerd2 = Instance.new("IntValue" , nerd) --fake sht ehhh nerd2.Name = "Exp"
local nerd3 = Instance.new("IntValue" , nerd) --fake sht ehhh nerd3.Name = "Gold" end) |
|
|
| Report Abuse |
|
|
|
| 28 Mar 2016 10:29 PM |
*All homework automated in 5 minutes* das it mane. |
|
|
| Report Abuse |
|
|
|
| 28 Mar 2016 10:30 PM |
@Flat well this is my full* script: (How would I save all of these..?) --- just add all the values to a table and save it. |
|
|
| Report Abuse |
|
|
| |
|
|
| 28 Mar 2016 10:59 PM |
| Well after saving is, how can I set the values when they rejoin..? |
|
|
| Report Abuse |
|
|
|
| 28 Mar 2016 11:02 PM |
example: local tab = {12, 144, 90, 20}; local ds = game:GetService("DataStoreService"):GetGlobalDataStore(); ds:SaveAsync("example_save", tab)
Loading it you'd just get the save and go through the list in order of how you saved it then setting the IntValues based on what you got from the array. |
|
|
| Report Abuse |
|
|
spinywind
|
  |
| Joined: 26 Jan 2012 |
| Total Posts: 3580 |
|
|
| 28 Mar 2016 11:40 PM |
http://www.roblox.com/item.aspx?id=388933292
|
|
|
| Report Abuse |
|
|
|
| 28 Mar 2016 11:53 PM |
| How is it 'Anti-Exploitable'..? |
|
|
| Report Abuse |
|
|
DrSaint
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 18429 |
|
|
| 28 Mar 2016 11:54 PM |
Meaning people can't go in and edit their values in the table.
|
|
|
| Report Abuse |
|
|
|
| 29 Mar 2016 12:08 AM |
| Oh lol, that's how mine works. |
|
|
| Report Abuse |
|
|
spinywind
|
  |
| Joined: 26 Jan 2012 |
| Total Posts: 3580 |
|
|
| 29 Mar 2016 12:19 AM |
Because all exploits are client sided and the stats are stored in server storage.
|
|
|
| Report Abuse |
|
|
|
| 29 Mar 2016 12:20 AM |
| ^ I know, that's what I do. |
|
|
| Report Abuse |
|
|