How to reset character without killing it?

So, im making the ability to be “ball” and actually its working. But the only problem, when i killing player it not dies. And not reseting character. I also tried to copy plr char descands, place them in workspace model, then add in char, and after cooldown remove the ball, and return old char, but the problem the copy of char is null (unable to set Parent to Null)

local toback = {}
			local char = plr.Character
			local Pos = plr.Character.HumanoidRootPart.CFrame
			local Humanoid = char.Humanoid:Clone()
			Humanoid.Parent = workspace
			for i, thing in ipairs(char:GetChildren()) do
				table.insert(toback, thing)
				thing:Destroy()
			end

			local ball = game.ReplicatedStorage.Character:Clone()
			for _, ish in ipairs(ball:GetChildren()) do
				ish.Parent = plr.Character
			end
			plr.Character.PrimaryPart = plr.Character:FindFirstChild("Torso")

			plr.Character.PrimaryPart.CFrame = Pos

			wait(abs["Brelic"]["Time"])
			local pos = char.Torso.CFrame 

			char.Humanoid:ChangeState(Enum.HumanoidStateType.Dead) --so it cannot die here, not reseting char

How to reset character without killing it?

i don’t kinda understand what do you mean?

Error:

Destroy() functon completely removes instances from game
and its not respawning because respawn only happens when Humanoid.Health reaches 0 or less or by function Player:LoadCharacter()

for i, thing in ipairs(char:GetChildren()) do
	table.insert(toback, thing)
	thing:Destroy()
end

Solutions:

  1. Not the best solution: try set thing.Parent to nil it still saves in memory
    but it would sometimes crash character and disable its function
  2. Make All parts inside character invisible and after make it visible again.
player:LoadCharacter()

if you want them to reload where they were standing before, you can just save the HRP cframe

2 Likes

That’s not a bad solution, but it shows on the player’s screen that they were killed, which isn’t ideal when the camera resets.

1 Like

Maybe an animated GUI or keeping the camera in the same place could fix that, along with removing the forcefield.

yep, thank you)
Now its works)
thanks for help.

1 Like