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
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:
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
Make All parts inside character invisible and after make it visible again.