Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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.

1 comment

0

check out my post.. I edited it and might help you too!

This discussion is preserved as it was. New answers, comments, and votes are closed.