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.

4 comments
Can you show the heirarchy to make sure "script.Parent.Parent" is actually the player?
Add "repeat wait() until plr.Character and plr.Character.Parent" right after you define "plr". The reason for this is because the character doesn't exist the second the player spawns, so it needs to wait for it. Also change line 2 to just "plr.Character = nil" Setting Character to nil just removes the character as well as setting the character to nil.
I was thinking that too @Tkdriverx, Also I figured given server scripts take longer to load and run I thought that the character would have loaded by then? (As opposed to local scripts that go right away and you need to use WaitForChild all the time)
It still doesn't load quick enough to get the Character the second it spawns. The GUI and Backpack usually load before the character does.