Yes, you can save Speed, JumpHeight and JumpPower using tables and datastore service.
Sorry for being on hiatus for awhile, I had some stuff come up in my personal life.
Anyway, I integrated your script into my game and it looked fine, didn’t have any errors, but it’s still not printing out anything at all or working as intended. For reference, this is a server script in server script service and here’s my slightly edited version of it:
local DSS = game:GetService("DataStoreService"):GetDataStore("SpeedDSS")
game.Players.PlayerAdded:Connect(function(plr)
local leaderstats = Instance.new("Folder", plr)
leaderstats.Name = "StatStore" --[[ Change this to the name of your leaderboard name it leaderboard if you want to see the leaderboard, if not set it to a random name, that’s you can remember --]]
local speed = Instance.new("IntValue", leaderstats)
speed.Name = "speed"
local jump = Instance.new("IntValue", leaderstats)
jump.Name = "jump"
local level = Instance.new("IntValue", leaderstats)
level.Name = "level"
local data = DSS:GetAsync(plr.UserId)
if data then
-- We know the player has data
speed.Value = data.speed
jump.Value = data.jump
level.Value = data.level
else
print("First Time Playing")
-- Set to default values
level.Value = 0
end
plr.CharacterAdded:Connect(function(char)
local Humanoid = char:FindFirstChild("Humanoid")
-- Setting walkspeed and jumpower
Humanoid.WalkSpeed = speed.Value > 0 and speed.Value or 20
Humanoid.JumpPower = jump.Value > 0 and jump.Value or 20
print(Humanoid.WalkSpeed .. " Walkspeed+Datastore: "..speed.Value)
print(Humanoid.JumpPower .. " JumpPower+Datastore: "..jump.Value)
end)
end)
game.Players.PlayerRemoving:Connect(function(plr)
local TableGettingSaved = {}
for i, v in pairs(plr:WaitForChild("StatStore"):GetChildren()) do
TableGettingSaved[v.Name] = {Name = v.Name, Value = v.Value}
end
DSS:SetAsync(plr.UserId, TableGettingSaved)
end)
Thanks again so much for your efforts to help me Tom! (and others)
just to clarify, I don’t know what I’m doing to cause it to have no output.