Hey so I made this script that changes the player’s character to a custom character I made (works fine) when they touch a part. Then when the player touches a different part they switch back to their original character (also works). However when the player repeats the process they don’t switch back to their original character.
Makes them the custom character
local lastPosPlayer = {}
local animate = game.ServerScriptService:WaitForChild("Morphing"):WaitForChild("KEKIMorph"):WaitForChild("Animate"):Clone()
animate.Disabled = false
animate.Parent = game.StarterPlayer.StarterCharacterScripts
newBody = game.ReplicatedStorage.Characters.KEKI.lvl1:FindFirstChild("StarterCharacter"):Clone()
newBody.Parent = game.StarterPlayer
lastPosPlayer[player] = player.Character.PrimaryPart.Position
player:LoadCharacter()
wait(.3)
player.Character:MoveTo(lastPosPlayer[player])
newBody:Destroy()
animate:Destroy()
Switches them back
local function morph_to_original(player)
player:LoadCharacter()
print("loaded character")
end
morph_to_original(player)
“loaded character” does print everytime.