Problems while changing the character model

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to change the player model to a custom one via script while keeping the StarterCharacterScripts active.

  2. What is the issue? Include screenshots / videos if possible!
    Player dissolves into nothingness after changing the character


    with script 1 below
    OR

    with script 2 below

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Ive tried this :

local function CheckXp (XP,plr,Stamina)
	
	if XP.Value >= 100 and not gotLevel2 then
		gotLevel2 = true
		print("upgraded to lvl 2")
		
		local NewChar = Fish.Level_2.Jellyfish.Model:Clone()
		NewChar.Parent = workspace
		NewChar.Name = plr.Name
		
		plr.Character = NewChar
	elseif XP.Value >= 500 and not gotLevel3 then
		gotLevel3 = true
		print("upgraded to lvl 3")
	elseif XP.Value >= 1500 and not gotLevel4 then
		gotLevel4 = true
		print("upgraded to lvl 4")
	elseif XP.Value >= 5000 and not gotLevel5 then
		gotLevel5 = true
		print("upgraded to lvl 5")
	end
end

and

local function CheckXp (XP,plr,Stamina)
	
	if XP.Value >= 100 and not gotLevel2 then
		gotLevel2 = true
		print("upgraded to lvl 2")
		
		local NewChar = Fish.Level_2.Jellyfish.Model:Clone()
		game:GetService("StarterPlayer"):FindFirstChild("StarterCharacter"):Destroy()
		
		NewChar.Parent = game:GetService("StarterPlayer")
		NewChar.Name = "StarterPlayer"
	
		plr:LoadCharacter()

	elseif XP.Value >= 500 and not gotLevel3 then
		gotLevel3 = true
		print("upgraded to lvl 3")
	elseif XP.Value >= 1500 and not gotLevel4 then
		gotLevel4 = true
		print("upgraded to lvl 4")
	elseif XP.Value >= 5000 and not gotLevel5 then
		gotLevel5 = true
		print("upgraded to lvl 5")
	end
end

Just do:

player.Character = model.path.here

It’ll set the player’s character to that model, no problems at all.