Evening folks, I’m attempting to get a custom seat anim to work, and the default sit animation is messing it up quite a bit. This is my code so far:
local sitAnim = 14689300896 -- make this your animation!
local seat = script.Parent --Link this to the seat
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.Priority = "Idle" -- maybe this will fix
playingAnim.Looped = true -- maybe this will fix
playingAnim:Play()
end
end)
and it mostly works, however as stated before, the default animation isn’t going away. The animation itself is set to idle and looped, but I tried it with the script anyway. Any ideas?
Try setting playingAnim.Priority to “Action”. “Action” is the highest form of priority for animations, and should therefore override the normal seating one.
I believe you can set an animation track’s weight with track:AdjustWeight(weight). Try doing that, setting it to a higher number, like 20. If not, then make the animation key frame all limbs into that required position.