NPC's won't work?

I have this game with over 200 R6 NPC’s and for some reason, a lot of those NPC’s in-game don’t sit even though they are positioned above the seats.

And the few NPC’s that DO actually work/sit, they don’t have a sitting animation for some reason? Their legs just go through the chair.

I’m not sure why this is happening although I can sit on those seats normally (I am in R6 too) and it does play the sitting animation.

How can I fix this please?

local RigModel =  -- your npc
local sitAnim = RigModel:WaitForChild("Animate"):WaitForChild("sit"):WaitForChild("SitAnim") -- Sit animation inside the rig
RigModel:WaitForChild("Humanoid"):WaitForChild("Animator"):LoadAnimation(sitAnim):Play() -- play anim
workspace:WaitForChild("Seat"):Sit(RigModel:WaitForChild("Humanoid")) -- sit the rig on a seat instance
1 Like

Apologies for the question, but where do I place this?

Also since there are about 300 NPC’s inside 1 folder, is it possible to do 1 script for all NPC’s so that I don’t need to do a script for each NPC?

Hey there,
if this hasn’t been fixed yet, please let me know if this works:

Create a folder named “Bots”
Put all of your bots into said folder – Do all of this if you haven’t already lol. If you have, skip this part
Create two scripts: one under the main Bot folder and the second one inside of the first script.
The script under the main folder:

for i,v in pairs(script.Parent:GetDescendants()) do
	if v:IsA("Model") then
		local handout = script.Handout:Clone()
		handout.Enabled = true
		handout.Parent = v
	end
	
end

And the script inside of the first folder:

local RigModel = script.Parent
local Animator = Instance.new("Animator")
Animator.Parent = RigModel:WaitForChild("Humanoid")
local sitAnim = RigModel:WaitForChild("Animate"):WaitForChild("sit"):WaitForChild("SitAnim") -- Sit animation inside the rig
RigModel:WaitForChild("Humanoid"):WaitForChild("Animator"):LoadAnimation(sitAnim):Play() -- play anim
RigModel:WaitForChild("Humanoid").Jump = true

Try this and get back to me. Im not sure if this will work but hopefully it does :smiley: