ive been trying for hours to get the leaderboard value to update as you get more and more speed but i have not succeeded what so ever (exept updating it only once when you touch the baseplate) but that wont update with the touched function i put in there so i removed it this is the code:
local DSService = game:GetService("DataStoreService"):GetDataStore("Speed") game.Players.PlayerAdded:Connect(function(plr) local speedy = "id-"..plr.UserId local leaderstats = Instance.new("IntValue",plr) local savevalue = Instance.new("IntValue") leaderstats.Name = 'leaderstats' savevalue.Parent = leaderstats savevalue.Name = 'Speed' local GetSaved = DSService:GetAsync(speedy) if GetSaved then savevalue.Value = else local NumbersForSaving = {savevalue.Value} DSService:SetAsync(speedy,NumbersForSaving) end end) game.Players.PlayerRemoving:Connect(function(plr) local speedy = "id'"..plr.UserId local Savetable = {plr.leaderstats.Speed.Value} DSService:SetAsync(speedy,Savetable) end)