Hello there,
I have NPCs in my game which walk around, sit, stand, and leave. Below, is the Unseat()
function I made for making the NPCs stand. It works for the first ~6-8 NPCs, but then after that the NPCs Jump
value is set to true, but they do not leave their seat. This results in the NPCs trying to walk in their seat. I’ve spent over a week, with hours each day, trying to figure this out and I can’t find a solution.
-- Unseats a character from a seat
function movement:Unseat(character)
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
if animator then
local sitAnimationTrack = animator:FindFirstChild("SitAnimationTrack")
if sitAnimationTrack then
sitAnimationTrack:Stop()
end
end
--humanoid.Jump = true
humanoid.Sit = false
wait(0.1)
humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
end
Any help would me much appreciated. Thank you!