Don't judge me i'm new to scripting
But basically, when i try to add value to my "Job" leaderstat, my datastore doesn't find any problems, buy when i do it with this script, it won't save
Please help me
--[Variables]
local jobstat = game.Players.LocalPlayer.leaderstats.Job
local mainframe = script.Parent
local maintextlabel = mainframe.CenterFrame.ChooseLocation
--[Text Variables]
local maintext = "Please choose your first location..."
--[Pre-Starting Scripts]
mainframe.Position = UDim2.new(0,0,-1.5,0)
wait(4)
--[Starting Scripts]
if jobstat.Value >=1 then
script.Parent.Parent:Destroy()
else
script.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),"InOut","Sine",0.3)
jobstat.Value = 1
for i = 1, #maintext do
maintextlabel.Text = string.sub(maintext, 1, i)
wait(0.02)
end
end

1 comment
Give the datastore script