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.
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.
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:
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
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?
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