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

Is there anyway I can make this DataStore script shorter/more organized?

Asked by 9 years ago

Before I saw someone on this site say to use Table's when you plan on storing ton's of stuff in DataStore, so I tried doing it for testing purposes and came out with this, it work's fine, but I was wondering if there is anyway I can make this script shorter/make it more organized.

Any help appreciated.

It is GUI based, but I converted it to hint's for ScriptingHelpers.

Script:

01-- December 6, 2015
02 
03-- Settings
04local ToSave = {"Cash"}
05 
06-- Variables
07local Player = script.Parent.Parent.Parent.Parent
08local Stats = Player:WaitForChild("leaderstats")
09 
10local Button = script.Parent.Parent.TextButton
11local Button2 = script.Parent.Parent.TextButton2
12 
13local DataStore = game:GetService("DataStoreService"):GetDataStore("GameService")
14 
15local Debounce = false
View all 66 lines...

Answer this question