Why isn't this sit animation script working?

The animation plays for a split second, but then turns into a normal sit animation…

local sitAnim = 05113437449
local seat = script.Parent
local playingAnim

local newAnim = Instance.new("Animation")
newAnim.AnimationId = "rbxassetid://"..sitAnim

seat.Changed:Connect(function(property)
if property == "Occupant" then
	local occupant = seat.Occupant
		if not occupant then if playingAnim then playingAnim:Stop() return end end
		playingAnim = occupant:LoadAnimation(newAnim)
		playingAnim:Play()
		newAnim.Looped = true
	end
end)

help would be appriciated.

Try setting the animation priority to Action.

playingAnim = occupant:LoadAnimation(newAnim)
playingAnim.Priority = Enum.AnimationPriority.Action
playingAnim:Play()
3 Likes

The priority must be higher than core (all roblox core animations have priority core)

so what priority should it be?

Action is the highest one, but if you have other things going on while the player is trying to sit aka animations then it will override them

oki lemme try it

–30 charssss

1 Like