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
 

Re: How to make a data system for filter enabled?

Previous Thread :: Next Thread 
AzTecNat is not online. AzTecNat
Joined: 19 Aug 2016
Total Posts: 22
26 Sep 2016 06:13 PM
im trying to make a data system for fe.
-- This is Simple Data Persistance for your game :D
-- Just put this into the Workspace and you can save multiple scores in your game when
-- players enter and leave :)
-- WARNING: You need to have leaderstats with at least one stat to be saved in it
-- or this script is pointless and won't work :)
-- By: CloneTrooper1019
-- Feel free to erase all this green text. I don't care.
-- Im just glad you are using my script :)

--------Don't edit below unless you know what your doing--------

function onPlayerEntered(player)
wait(5)-- Give the game a moment to find the player instead of shooting instantly.
player:WaitForDataReady() -- Gotta have this
repeat wait(0.01) until player:FindFirstChild("leaderstats") -- waits for the stats.
if player.DataReady then -- A little pointless But whatever :)
if player:findFirstChild("leaderstats") then
local score = player.leaderstats:GetChildren() -- Were going to find some scores.
for i = 1,#score do
local ScoreLoaded = player:LoadNumber("Halo"..score[i].Name.."") -- This looks for the score.
wait() -- Wait for the score to load.
if ScoreLoaded ~= 0 then
score[i].Value = ScoreLoaded
end
end
end
end
end

function onPlayerLeaving(player) -- We gotta fire this before the player leaves.
if player:findFirstChild("leaderstats") then
local score = player.leaderstats:children() -- Targeting the scores before the player is gone
for i = 1,#score do
player:SaveNumber("Halo"..score[i].Name.."", score[i].Value) -- Saving the score.
end
end
end

game.Players.PlayerAdded:connect(onPlayerEntered)
game.Players.PlayerRemoving:connect(onPlayerLeaving)
print("Save system Has been Successfully loaded!")


Tastefullittlehamlet.
Report Abuse
llaserx is not online. llaserx
Joined: 10 Dec 2011
Total Posts: 53069
26 Sep 2016 06:15 PM
Funny because its outdated

And a save system can be automatically fe compatible
Report Abuse
AzTecNat is not online. AzTecNat
Joined: 19 Aug 2016
Total Posts: 22
26 Sep 2016 06:16 PM
Oh thanks mane


Tastefullittlehamlet.
Report Abuse
Fangous is not online. Fangous
Joined: 03 Jul 2010
Total Posts: 4448
26 Sep 2016 06:18 PM
at first i thought you were asking a question
then i realized you were actually just giving an answer
then i realized the answer was from someone else

why is this even relevent
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
26 Sep 2016 06:20 PM
why did you bother posting like 10 lines of comments?
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
26 Sep 2016 06:38 PM
this is probably copied and data persistence is bad anyway


Ever wanted to learn how to script? Check out my YouTube channel: youtube.com/austintheslayer Want to see me code in action? Follow my twitch: twitch.tv/austinrblx
Report Abuse
iDerpyDogez is not online. iDerpyDogez
Joined: 05 Feb 2012
Total Posts: 1781
26 Sep 2016 06:51 PM
what recurring said


𝒷𝓁𝑜𝒷𝒻𝒾𝓈𝒽 𝒶𝓇𝑒 𝑔𝑜𝒾𝓃𝑔 𝓉𝑜 𝒷𝑒 𝒷𝓇𝒾𝒸𝓀𝓈 𝒻𝑜𝓇 𝓂𝓎 𝓌𝒶𝓁𝓁; 𝓉𝒶𝓇𝒹𝒾𝑔𝓇𝒶𝒹𝑒𝓈 𝒶𝓇𝑒 𝑔𝑜𝒾𝓃𝑔 𝓉𝑜 𝒷𝑒 𝓉𝒽𝑒 𝑔𝓁𝓊𝑒 𝒻𝑜𝓇 𝓂𝓎 𝓌𝒶𝓁𝓁
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
26 Sep 2016 06:53 PM
yeah what i said


Ever wanted to learn how to script? Check out my YouTube channel: youtube.com/austintheslayer Want to see me code in action? Follow my twitch: twitch.tv/austinrblx
Report Abuse
iDerpyDogez is not online. iDerpyDogez
Joined: 05 Feb 2012
Total Posts: 1781
26 Sep 2016 06:54 PM
yeah


𝒷𝓁𝑜𝒷𝒻𝒾𝓈𝒽 𝒶𝓇𝑒 𝑔𝑜𝒾𝓃𝑔 𝓉𝑜 𝒷𝑒 𝒷𝓇𝒾𝒸𝓀𝓈 𝒻𝑜𝓇 𝓂𝓎 𝓌𝒶𝓁𝓁; 𝓉𝒶𝓇𝒹𝒾𝑔𝓇𝒶𝒹𝑒𝓈 𝒶𝓇𝑒 𝑔𝑜𝒾𝓃𝑔 𝓉𝑜 𝒷𝑒 𝓉𝒽𝑒 𝑔𝓁𝓊𝑒 𝒻𝑜𝓇 𝓂𝓎 𝓌𝒶𝓁𝓁
Report Abuse
Aliics is online. Aliics
Joined: 29 Sep 2014
Total Posts: 471
26 Sep 2016 07:02 PM
isn't stuff like 'SaveNumber' deprecated because of DataStore?
Report Abuse
iDerpyDogez is not online. iDerpyDogez
Joined: 05 Feb 2012
Total Posts: 1781
26 Sep 2016 07:03 PM
yeah thats data persistence


𝒷𝓁𝑜𝒷𝒻𝒾𝓈𝒽 𝒶𝓇𝑒 𝑔𝑜𝒾𝓃𝑔 𝓉𝑜 𝒷𝑒 𝒷𝓇𝒾𝒸𝓀𝓈 𝒻𝑜𝓇 𝓂𝓎 𝓌𝒶𝓁𝓁; 𝓉𝒶𝓇𝒹𝒾𝑔𝓇𝒶𝒹𝑒𝓈 𝒶𝓇𝑒 𝑔𝑜𝒾𝓃𝑔 𝓉𝑜 𝒷𝑒 𝓉𝒽𝑒 𝑔𝓁𝓊𝑒 𝒻𝑜𝓇 𝓂𝓎 𝓌𝒶𝓁𝓁
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
26 Sep 2016 07:29 PM
You can make comments on multiple lines by not doing -- every line, if you want:

--[[This is your comment.
This is your comment too.
This is also your comment. --]]
print("Hello, world!") --This is NOT your comment.
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