Hi everyone,
This is my first post on the DevForum, and I am trying to construct a morph system commonly seen in role-playing games where I trigger a ProximityPrompt and the player’s Character changes.
I also want to make it clear that I don’t have much developer experience. I’ve been using Studio for almost three years, but my scripting knowledge is very limited.
So far, things have been running smoothly. I cleared all of the Character’s children and cloned all of the children of the morph model to the Character. My morph model has all of the basic Character scripts, such as “Animate” and “Health,” but my main issue is that, after using the morph, the character cannot jump.
I have tried to fix this problem, even replicating my avatar and reconstructing the morph model, but it does not work. I have not looked for any solutions on the Developer Hub.
Here is my script:
script.Parent.ProximityPrompt.Triggered:Connect(function(obj)
obj.Character:ClearAllChildren()
local items = script.Parent.Parent.MorphModel:Clone()
local itemchildren = items:GetChildren()
for i = 1, #itemchildren do
itemchildren[i].Parent = obj.Character
end
end)
Why doesn’t my Character jump when I use the morph?
Clearing all children in a character will remove everything, including the humanoid (which is what players use to control characters, along with other things).
You got 3 options:
Respawn the player as the rig rather than trying to convert the old rig into the new one
Keep the old rig but make it invisible and duplicate the new rig on top of yourself (It’s generally the most effective way to do these types of things but takes extra consideration and effort to look right)
Try to convert your pre-existing rig into the new one (I don’t recommend this one)