local DataStores = game:GetService("DataStoreService")
local FirstDataStore = DataStores:GetDataStore("JumpPowerStorage")
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
wait(0.1)
player.Character.Humanoid.JumpPower = FirstDataStore:GetAsync(player.UserId) or 50
FirstDataStore:SetAsync(player.UserId, player.Character.Humanoid.JumpPower)
player.Character.Humanoid.Changed:connect(function()
wait(2)
FirstDataStore:SetAsync(player.UserId, player.Character.Humanoid.JumpPower)
end)
end)
end)
game.Players.PlayerRemoving:connect(function(player)
FirstDataStore:SetAsync(player.UserId, player.Character.Humanoid.JumpPower)
end)
A person here a while ago gave me this script however it keeps returning async errors... any way how to fix?

1 comment
Wrap any data store functions in a pcall to prevent errors