Having trouble with a custom character

Hello!

I’m trying to spawn a certain player in as a custom character. I have been able to load the actual character, but the animations do not seem to be working. When I walk, it still plays the idle animation, I cannot seem to jump, and I can barely walk. I don’t know what is causing this.

https://gyazo.com/99a968d396789714bbda4c2fecfd7727

When I try to pull the character up using the move tool in studio, this happens:

https://gyazo.com/a920f0b8fda4f7a33ffb7ea676970c02

This makes me think that the character is stuck inside the ground, but when I try spawning it a bit higher, the same thing happens.

local function assignAlienRig(player)
	local ServerStorage = game:GetService("ServerStorage")
	local Players = game:GetService("Players")
	local rig = ServerStorage.AlienRig.AlienRig 
	local character = player.Character
	if character then
		local root = character:FindFirstChild("HumanoidRootPart")
		
		if root then
			local clone = rig:Clone()
			local spawnPos = root.CFrame
			
			player.Character:Destroy()
	    	player.Character = clone
			clone.HumanoidRootPart.CFrame = spawnPos + Vector3.new(0,5,0)
			player.Character.Parent = workspace
			wait(0.7)
			player.Character.Animate.Disabled = false
		end
	end
end

I have no idea what’s causing this. Any help is appreciated. :slight_smile:

1 Like

Do you want every player to be spawned in as this?

Also, I would use:

local root = character:WaitForChild("HumanoidRootPart")

Incase the player hasn’t loaded fully.

Are you also instantiating a new animation script because you’re disabling the old one? The weird movement behaviour seems to be a result of some secondary force, check to see if your hip height is correct and CanCollides are as that of a Humanoid’s

I have checked the CanCollides and indeed they were not the same as that of a Humanoid’s, so I changed that. I can now walk and jump and the animations are loading, but this is happening:

https://gyazo.com/8d59173696ebc224fce8828128c3790c

This looks like a HipHeight issue - you’re no longer clipping because you’ve made the legs non-collidable, but if you don’t raise the hip height you will continue to intersect with the floor

How do I raise the HipHeight? (30 Characters)

Nevermind, figured it out. Thank you!

Wait, I still have an issue. I set the hip height to 4, and when the player is idle, the character’s feet go through the ground. When they walk, it’s fine. Any way to fix this?

https://gyazo.com/765db4cd252458157513b84ec7889663

Is it a custom idle/run animation? If so, did you modify the HRP/Torso height? It looks as though you have because of the torso leaning forwards, which was probably moved downwards on the Y axis, which in turn would have reduced the y pos of the legs. You either need to modify the animation to remove this, or you need to increase the hip height whilst idle, then return to normal when moving

1 Like