local function Morph(MorphName, MorphStats, MorphModel)
if not Character then return end
if not Debounce then
Debounce = true
local OldCharacter = Character
local NewCharacter = MorphModel:Clone()
NewCharacter.Name = Player.Name
local Humanoid = NewCharacter:FindFirstChildWhichIsA("Humanoid")
Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.Viewer
NewCharacter.HumanoidRootPart.Anchored = false
NewCharacter:SetPrimaryPartCFrame(OldCharacter.PrimaryPart.CFrame)
Player.Character = NewCharacter
NewCharacter.Parent = workspace
Character = NewCharacter
OldCharacter:Destroy()
wait(0.5)
UpdateHealth()
Debounce = false
end
end
im pretty sure when you load a Player into roblox, the Gui, Backpack, and StarterGui basically gets copied to its set “character” and all of it’s now as a child under the character.
it looks like youre destroying the old character, creating a new one (that didn’t get the Gui, Backpack, and StarterGui injected because it wasn’t created by the Player with roblox’s system), and then just redirecting the Player to the new character body.
perhaps you could create the morph in a different way? or figure out how to copy all of the scripts, gui, and backpack to the new character before switching? (though that would mean all scripts have new initialization, which would be a pain in the butt). imo, you should either keep the character the same object (same root, humanoid, etc), but change the physical parts/meshes? or perhaps just make the original character invisible and add onto it from there?
I have no idea how best to do it, help me
well i mean, i havent done morphs yet but i could imagine how to do it, just depends on what youre trying to morph into.
what is the morph exactly? a creature with an entirely different rig to the body, or just changing the meshes + adding mesh accessories on the current player’s model?
I was already able to finish my morphs and they work