Hello! I’m having a problem with a morph system (skins) that I made in my game. Basically, the animations (running, jumping, walking) can only be seen by the player using the character. The rest of the players do not see such animations. The script that replaces the player’s character with the new one is this:
function LoadSkin(player,skinName)
if skinsFolder:FindFirstChild(skinName) and player.Character:FindFirstChild("Animate") then
local newChar = skinsFolder:FindFirstChild(skinName).Character:Clone()
local currentChar = player.Character
if newChar then
local animateScript = player.Character.Animate:Clone()
newChar.Name = player.Name
newChar:SetPrimaryPartCFrame(CFrame.new(workspace:FindFirstChildWhichIsA("SpawnLocation",true).Position))
player.Character = newChar
for _,child in pairs(workspace:GetDescendants()) do
if child.Name == player.Name then
child:Destroy()
end
end
newChar.Parent = workspace
for _,starterScript in pairs(game.StarterPlayer.StarterCharacterScripts:GetChildren()) do
local newScript = starterScript:Clone()
newScript.Parent = newChar
end
animateScript.Parent = newChar
currentChar:Destroy()
end
end
end
The characters or “morphs” are stored in ReplicatedStorage as follows:
As you can see, what I do is clone the character from the ReplicatedStorage, set it as the player.Character, copy and paste the StarterCharacterScripts into the new character and finally copy the “Animate” script from the original character of the player and paste it into the new one.
Here is a video of what happens: https://gyazo.com/6fb4976b78f24be37a03bc736cf8fb4c
I know this could be fixed using HumanoidDescription, but the problem is that my characters (morphs) don’t have one. I tried to use it but it doesn’t work.
Is there any solution for this? Thanks!