Hello, do they have actual ai right now or are they just models? If they’re just models you can just anchor them! Its not gonna be a long lasting solution, but a solution nonetheless
Just check the HumanoidStateType applied to the NPC to check which one exactly is doing that, and then perhaps disable that state using Humanoid:SetStateEnabled([statename], false).
Let me ask though, is your ai run in the server or the client? This could also be caused by network ownership.
What part of what I said have you not understood? Once again, check their states. That is either caused by network ownership or HumanoidStateType, exactly as I said. That is not just a ground collapse being caused by something else.
Also server is not the only acceptable location for an AI and specially pathfinding? Please search about client-based NPCs and how they’re generally more performant for bigger games. That claim makes no sense.
-- what position are you teleporting them to? if you’re using the floor position, they might get ragdolled on teleport due to being clipped into the ground a bit since MoveTo moves the torso to that point. in that case try adding HipHeight + Root.Size.Y * 0.5 to the Y position so that their feet are planted on the ground. if it’s R6 also add + LeftLeg.Size.Y
-- roblox humanoids are incredibly unpredictable to me so i’m just guessing here, i’d need to know more about your scripting otherwise
By the way I made a final boss NPC thats like a custom model but for some reason it falls through the floor. I set its cancollide and anchor to false cause thats how u get it to animate
-- if all your players are default R6 height then you’d add Vector3.new(0.0, 3.0, 0.0) instead of 2.5, though i doubt that extra half a stud would be causing them to fall over. try placing the PivotTo right before you set the parent to workspace, in general it’s better to finish setting up all your variables before placing them into the world
-- so
local function spawnNpc(template: Model, cf: CFrame, parent: Instance)
local npc = template:Clone()
npc:PivotTo(cf + Vector3.new(0.0, 3.0, 0.0))
npc.Parent = parent
return npc
end
-- nah, cancollide doesn’t prevent animations from working. if the spikes are separate parts i’d say they should have cancollide set to false, but the body itself should have collision, or the rootpart if you set it up as a humanoid
You need to call it in a script. preferably, parented to the Humanoid itself and then you can just do: script.Parent:SetStateEnabled(Enum.HumanoidStateType.GettingUp,true)
I was wrong, it’s SetStateEnabled not SetHumanoidStateEnabled.