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!
First Universe:
local healthStore = game:GetService("DataStoreService"):GetDataStore("healthStore") game.Players.PlayerRemoving:connect(function(player) player:SetAsync(tostring(player.userId).." saved health", player.Character.Humanoid.Health) end)
Second Universe:
local healthStore = game:GetService("DataStoreService"):GetDataStore("healthStore") game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(c) c.Humanoid.Health = healthStore:GetAsync(tostring(player.userId).." saved health") end) end)