Here is the code
local plr = script.Parent.Parent plr.Character:FindFirstChild("Humanoid").Parent:Destroy() local characterbod = game.ReplicatedStorage.Test:Clone() characterbod.Name = script.Parent.Parent.Name characterbod.Parent = workspace characterbod:MoveTo(workspace.Part.Position) local cam = workspace.CurrentCamera plr.Character = characterbod
On line two, the error says that character is a nil value. PLEASE HELP ME
Fixed: Here is the better one.
Just simply add
repeat wait() until plr.Character and plr.Character.Parent
right after you define 'plr'.
Also change line 2 (the current line 2) to plr.Character = nil
Setting the character to nil also removes the character.