The script is supposed to keep the players health inbetween two places (but are still in the same "universe")!
here is the script
local healthStore = game:GetService("DataStoreService"):GetDataStore("healthStore")
game.Players.PlayerRemoving:connect(function(player)
player:UpdateAsync(player.Name.." saved health", player.Character.Humanoid.Health)
end)
and
local healthStore = game:GetService("DataStoreService"):GetDataStore("healthStore")
game.Players.PlayerAdded:connect(function(player)
player.Character.Humanoid.Health = healthStore:GetAsync(player.Name.." saved health") --sets the Humanoid's health to the saved number, which is the health when the player left the previous Place
end)
this is not my script, I got it from somebody else that helped me!

4 comments
NEVER use player.Name use player.userId
Also your gonna need OrderedDatastore to get the key,value.
K, I switched it on both, testing now