Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why do my character animations and handle's not work on my custom character?

Asked by 3 years ago
Edited 3 years ago

When I put a StarterCharacter in the StarterPlayer, the basic R6 animations load and the handle of my tool works. But when I load in a custom character through a script, the animations and handle don't work. The arm which I hold my tool with stays down vertically.

This is how I load in my character:

local RepStore = game:GetService("ReplicatedStorage") 
local ChoiceEvent = RepStore:WaitForChild("ChoiceEvent")
local Characters = RepStore:WaitForChild("Characters")
ChoiceEvent.OnServerEvent:Connect(function(Player)
local CharSelect = math.random(1,7)
print(CharSelect)
    if CharSelect == 1 then
        local Character = Characters:FindFirstChild("Character1")
        if Character then
            local NewCharacter = Character:Clone()
            NewCharacter.Parent = game.Workspace

            Player.Character = NewCharacter
        end
    end
    if CharSelect == 2 then
        local Character = Characters:FindFirstChild("Character2")
        if Character then
            local NewCharacter = Character:Clone()
            NewCharacter.Parent = game.Workspace

            Player.Character = NewCharacter
        end
    end

-- You get the rest!

The characters that I load in are exactly the same as the StarterCharacter and have the same settings as the starter character. Except that the custom characters wear a hat. What is the problem and what could be the fix?

Thank you in advance!

Edit:

I used HumanoidDescription to load the characters (R6 in this case for me.) I first defined the HumanoidDescriptions and then load the existing character with a humanoid description.

            NewCharacter.Parent = game.Workspace

            Player.Character = NewCharacter
            local humanoidDescription = RepStore:WaitForChild("HumDesc"):WaitForChild("Char2Desc")
            Player:LoadCharacterWithHumanoidDescription(humanoidDescription)
        end
    end

2 answers

Log in to vote
0
Answered by
imKirda 4491 Moderation Voter Community Moderator
3 years ago

I might be wrong but it could be because the Animate script breaks when you reload the character, i tested it and had the same issue as you so i just restarted the script by doing this:

...
if CharSelect == 1 then
    local Character = Characters:FindFirstChild("Character1")
    if Character then
        local NewCharacter = Character:Clone()
        NewCharacter.Parent = game.Workspace
        Player.Character = NewCharacter

        -- here
        NewCharacter.Animate.Disabled = true
        NewCharacter.Animate.Disabled = false
    end
end
    ...

Make sure that Animate script is inside the character too.

0
check out my post.. I edited it and might help you too! baukeblox12 4 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

This might help: https://www.youtube.com/watch?v=5sE-9GXex7k&t ^^ show u how to animte custom rigs, I personally don't know much but this may help you

Answer this question