How do i not make a npc seat on a seat

Im currently trying to make a npc not sit in a seat because when it follows me it just gets stuck in it
I’ve been looking at some solutions but nothing worked

Heres the code

wait(1)
local character = script.Parent

character.Torso.Touched:Connect(function(hit)
	if hit:IsA("Seat") then
hit:Destroy()
	else
		
	end
end)

I think the best solution for you, rather then listening for the Torso to be touched and destroying it if it’s a seat, is to simply disable the NPC from sitting.

This can be done using the Humanoid's SetStateEnabled method.
script.Parent.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated, false)

3 Likes

Thank you so much! ive been trying to do everything i can.

Maybe try:

character.Humanoid.Sit = false

or

hit.CanCollide = false -- turn off seat
character.Humanoid.Sit = false -- force humanoid to stand
wait(1) -- let the NPC get away from the seat
hit.CanCollide = true -- turn the seat back on

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.