Hello,
Im trying to make a morph menu currently. Everything works up until when the player is in the morph. It transfers correctly and everybody spawns correctly with no trouble. When the player is in the morph the HumanoidRootPart moves around in a circular motion without guidance from the player.
Example:
Im not sure what to try. I have tried welding the parts and so far nothing has worked. My friend was able to do something and was able to get the character to move and fixed the random movement from the HumanoidRootPart but there were no animations.
In case anybody is wondering the model looks like this in explorer:
What does it look like when the player is morphed in the explorer? Also I’m pretty sure it’s because you didn’t set the player’s character property to the newly morphed character. When the player instance isn’t connected to any character in its properties, it will do what is being seen in the video.
It looks the exact same. Nothing changes.
This is the script by the way. Is there anything I could have missed in here?
From another developer forum post
local function transform(char,model)
local model=model:Clone()
model:SetPrimaryPartCFrame(char.PrimaryPart.CFrame+Vector3.new(0,model:GetExtentsSize().Y,0))
local h=char.Humanoid
local function unkill()
h:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
end
for i,v in pairs(h:GetPlayingAnimationTracks()) do
v:Stop()
end
h.Parent=game.ReplicatedStorage
unkill()
for i,v in pairs(char:GetChildren()) do
if v.Name~="Humanoid" and not v:IsA("Script") and not v:IsA("LocalScript") then
v:Destroy()
end
end
local hipheight=model.Humanoid.HipHeight
local primary=model.PrimaryPart
for i,v in pairs(model:GetChildren()) do
if v.Name~="Humanoid" then
v.Parent=char
end
end
-- synchronize.
model:Destroy()
char.PrimaryPart=char.HumanoidRootPart
h.HipHeight=hipheight
h.Parent=char
char.PrimaryPart=char.HumanoidRootPart
h.HipHeight=hipheight
local plr=game.Players:GetPlayerFromCharacter(char)
if plr then -- thanks roblox.
game.ReplicatedStorage.HipHeight:FireClient(plr,hipheight)
end
end
local function testing(player)
local character = player.Character
transform(character,workspace.Iden)
end
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(testing)```
You are not setting the new character to the player.Character property.
This is all you should need to do once the characterclone is created and ready.
I added that to the end of the transform function. Now whenever the function gets called the humanoid gets destroyed and the error “Player:Move called, but player currently has no humanoid” floods the output.