Honestly, i'm still having trouble with these darned Data Stores,
THIS IS A NORMAL SCRIPT WITHIN A GUI
Usually, how it works, when you leave the game, it's supposed to save the colors of the morph When you come back, if you've saved anything, it would change the gui's text to "LOAD" and it would lead you to a Continue screen
However, even if i did save, it still doesnt show as anything.
Either it doesnt save, something's gone wrong, or i wrote this script wrong:
And this may sound silly too, since it's one of the less harder scripts.
( Here is the save script: https://scriptinghelpers.org/questions/22446/why-wont-this-script-work )
( Also how do you activate a Localscript within a normal script? Just a quick question)
Sorry if i've been bothing anyone here with these scripts only relating to Data Stores, i've been working on this for awhile, and i want to get this done ASAP!
local DataStore = game:GetService("DataStoreService"):GetDataStore("NicuWolfSlot1")
game.Players.PlayerAdded:connect(function(player)
local viewkey = "Colorsfor"..player.userId
local Savedstuff = DataStore:GetAsync(viewkey)
if Savedstuff then
script.Parent.Text="Load"
end
end)
script.Parent.MouseButton1Click:connect(function(player)
local viewkey = "Colorsfor"..player.userId
local Savedstuff = DataStore:GetAsync(viewkey)
if Savedstuff then
script.Parent.Parent.Parent.Continue.Visible = true
script.Parent.Parent.Visible = false
print ("It's okay den")
else
print ("Nothing here!")
return
end
end)
