I have a game system where the player sits using a sit animation. It works by anchoring the character and setting their CFrame to match the chair’s CFrame.
I created an animation and tried to play it, but it does absolutely nothing.
function GameMain:PlayIdleAnimation(plr: Player)
local character = plr.Character
local humanoid = character.Humanoid
local animator: Animator = humanoid.Animator
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://id"
local track = animator:LoadAnimation(anim)
track.Looped = true
track:Play()
self:FindPlayerInTable(plr)[7] = track
end
you should just put a seat object inside of the chair so the player can sit if they walk over it without needing to create a script for it also if you have a custom sitting animation you should change it inside of the players animate script
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://id"
function GameMain:PlayIdleAnimation(plr: Player)
local character = plr.Character
local humanoid = character.Humanoid
local animator: Animator = humanoid.Animator
local track = animator:LoadAnimation(anim)
track.Priority=Enum.AnimationPriority.Action
track.Looped = true
track:Play()
self:FindPlayerInTable(plr)[7] = track
end
Animator script does play own animations hence why
Action priority should override them
Not to look egotistical, but firstly, you are completely wrong and do spread misinformation.
Second of all, I know the behavior of animations better than you know how to speak without multiple mistakes in a sentence.
animations don’t have any hardcodded behavior that ties to a root of joint being anchored.
The hell you are yapping about?
All animations do is update Transform property (internally) on a Motor6D/Bone