What is the issue?
I recently made a “Morph Script” and i’m using the same “Custom Character” for all the characters in-game, I also have a custom “Animate” script inside “StarterCharacterScripts” that has all the animations for those “Custom Characters”…
When i test the game in Roblox website (Not studio) with a friend, we have an issue with animations… At first we both can see our animations but when we use the “Morph System” animations won’t play on other players and they will stay in “T Pose” forever…
We also have another issue that when the players resets, they won’t keep the character they had before resetting…
Video with the issue
What solutions have you tried so far?
I tried to search for solutions on Youtube, Developer Hub, Google… and i found nothing that could help me fix these issues…
Script
local changeEvent = game.ReplicatedStorage.Events:WaitForChild("ChangePlayerCharacter")
local charsFolder = game.ReplicatedStorage:WaitForChild("Servants")
changeEvent.OnServerEvent:Connect(function(player,chosenCharacter)
if charsFolder:FindFirstChild(chosenCharacter) then
local newChar = charsFolder:FindFirstChild(chosenCharacter):Clone()
local plrChar = player.Character
if newChar:FindFirstChild("HumanoidRootPart") then
newChar.PrimaryPart = newChar.HumanoidRootPart
newChar:SetPrimaryPartCFrame(plrChar.HumanoidRootPart.CFrame)
elseif newChar:FindFirstChild("Torso") and not newChar:FindFirstChild("HumanoidRootPart") then
newChar.PrimaryPart = newChar.Torso
newChar:SetPrimaryPartCFrame(plrChar.Torso.CFrame)
end
if player.Character:FindFirstChild("Animate") then
local anim = player.Character:FindFirstChild("Animate"):Clone()
anim.Parent = newChar
end
newChar.Name = player.Name
player.Character = newChar
local rootPart = newChar:FindFirstChild("HumanoidRootPart") or newChar:FindFirstChild("Torso")
local plrRoot = player.Character:FindFirstChild("HumanoidRootPart") or player.Character:FindFirstChild("Torso")
if rootPart and plrRoot then
rootPart.CFrame = plrRoot.CFrame
end
newChar.Parent = workspace
else
warn("Character doesn't exist or something went wrong, Try again.")
end
end)
Hope that someone could help us… Thanks in advance!