Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Do you know any sources for learning about save-games?

Asked by 8 years ago

I am making a game entitled "Square RPG," and as an RPG, the current location of the player, as well as the stats, should be saved. However, I have not found a good source for learning how to go about implementing a script to save. Is anyone aware of a good source to learn? Or, if it is not against the guidelines, can you perhaps teach me how yourself?

Many thanks, --Crystakyl.

2 answers

Log in to vote
0
Answered by
Jumbuu 110
8 years ago

i dont know if this will help you but this helped me start https://www.youtube.com/watch?v=VXcbZ2kurvk

0
This is how I learned ^ User#11440 120 — 8y
0
However this video doesn't do much to teach you "how" or "why" it works. I would watch this video to make your save script then go the the guys links in the comments to figure out "why" and "how" the script you made works. User#11440 120 — 8y
Ad
Log in to vote
-1
Answered by 8 years ago

Message me on roblox > TriickXzoniQ for further questions. But how ever, i save my data in models or instances. For example, your making a rpg, you need to save; -Gold Currency -Xp Stats -Level * Progress*

I've set up my data save to work like so

Player Model -- What exactly is being saved < Gold --Number Value Xp --Number Value Level --Number Value

You can use data store so it saves >Model and all of it's contents, and loads it when a player joins. If the player does not have it however, it still loads it. Heres the script;

SavedFile = "File3" Server = "ServerSet1" function PlayerAdded(Player) Player:WaitForDataReady()
if Player:LoadInstance(SavedFile) == nil then Instance.new("Model",Player).Name = "Stats" Instance.new("NumberValue",Player.Stats).Name = "Gold" Instance.new("NumberValue",Player.Stats).Name = "Xp" Instance.new("NumberValue",Player.Stats).Name = "Level" elseif Player:LoadInstance(SavedFile) ~= nil then Player:LoadInstance(SavedFile).Parent = Player print ('Player Had File') end end function PlayerRemoved(Player) Player:WaitForChild("Stats") Player:SaveInstance(SavedFile,Player.Stats) end game.Players.PlayerRemoving:connect(PlayerRemoved) game.Players.PlayerAdded:connect(PlayerAdded)

0
That's data persistence. theCJarmy7 1293 — 8y

Answer this question