Why is my sit animation combined with the default sit animation?

  1. What do you want to achieve?
    I want to have a nice sitting pose animation for my game.
  2. What is the issue?
    I’ve already done my animation for the sitting pose, and it looks great!
    Roblox Studio:
    Screenshot 2022-10-14 195618
    Only in studio…
    While playing the game:
    Screenshot 2022-10-14 181510

Screenshot 2022-10-14 181602

You might not see it at first, but the issue is that in game it looks like it’s playing the default sit animation, and my animation at the same time. Take a look at how the character’s knees are bended and its hands are facing down. It doesn’t look like that in the first image.
3. What solutions have you thought of so far?

  • Changed the HumanoidRootPart RootPriority value to 1.
  • Unanchored all character body parts.
  • Disabled the default sit animation.

Extra details:
I have a ProximityPrompt that whenever it’s triggered, it uses the Seat:Sit(Humanoid) event.

local proximityPrompt = script.Parent
local seat = proximityPrompt.Parent.Parent
seat:GetPropertyChangedSignal("Occupant"):Connect(function()
	if seat.Occupant then
		proximityPrompt.Enabled = false
	else
		proximityPrompt.Enabled = true
	end
end)
proximityPrompt.Triggered:Connect(function(player)
	seat:Sit(player.Character.Humanoid)
end)

Maybe the :Sit(Humanoid) event has something to do with this whole issue. I tried removing the :Sit(Humanoid) event, and it didn’t work.


I also have another script that loads the animation I made. I got this script from a Youtube tutorial, but they didn’t even bother to show the script. They just showed how to get the model with the script, so I put that script into my seat.

seat = script.Parent
function added(child)
	if (child.className=="Weld") then
		local human = child.part1.Parent:FindFirstChild("Humanoid")
		if human ~= nil then
			local num = math.random(1, 2)
			if num == 1 then
			anim = human:LoadAnimation(seat.Animation1)
				anim:Play()
			else
				anim = human:LoadAnimation(seat.Animation2)
				anim:Play()
			end
		end
	end
end

function removed(child2)
	if anim ~= nil then
		anim:Stop()
		anim:Remove()
	end
end

seat.ChildAdded:connect(added)
seat.ChildRemoved:connect(removed)

I don’t think this script has anything to do with the issue, but here it is in case you guys need it.

After reading my second script for a while, I realized I don’t need it. I think the problem can be solved with only the first script. I did make some changes to it. :point_down: :point_down: :point_down:

local proximityPrompt = script.Parent
local seat = proximityPrompt.Parent.Parent
seat:GetPropertyChangedSignal("Occupant"):Connect(function()
	if seat.Occupant then
		proximityPrompt.Enabled = false
	else
		proximityPrompt.Enabled = true
	end
end)

proximityPrompt.Triggered:Connect(function(player)
	local char = player.Character or player.CharacterAdded:Wait()
	local hrp = char:FindFirstChild("HumanoidRootPart")
	local hum = char:FindFirstChildWhichIsA("Humanoid")
	local anim = hum:LoadAnimation(seat.Animation1)
	anim:Play()
	hrp.Position = seat.Position
	hum.JumpHeight = 0
	hum.WalkSpeed = 0
end)

It plays the animation, and positions the HumanoidRootPart to the Seat’s position. Now the idle animation and my sitting pose animation play together because I removed seat:Sit(player.Character.Humanoid).

I think you can override the default sitting animation, it may be an easier solution for you.

Copy the Animate script that gets created into the player’s character, and stuff it into StarterCharacterScripts.

I believe there’s a dictionary with specified states containing their animation IDs, just replace the one for sitting and it should work.

How about trying to change the animation’s priority to action or movement? This usually works for me when other animations override other ones.

3 Likes