Characters position change while playing animation

Helloo. I am currently working on a game where it needs to have cutscenes.

  1. What do you want to achieve? Animation playing without changing positions
  2. What is the issue? When playing the animation, characters position changes.
  3. What solutions have you tried so far? I’ve tried looking up in forums but i couldnt really find anything.

So i have script here that when the trigger gets touched, animation plays but the thing is that i think i need to put some sort of position values or something like that but i couldn’t really figure it out so i need your help.

How it should look
How it looks

Here is the script:

local cam = workspace.CurrentCamera

local debounce = false

local trigger = script.Parent
local rig = game.Workspace.CutscenePlace.HouseCutscene:WaitForChild(“Rig”)
local panic = game.Workspace.CutscenePlace.HouseCutscene:WaitForChild(“Panic”)

local r_anim = rig.Humanoid.Animator:LoadAnimation(script:WaitForChild(“ranimation”))
local p_anim = panic.Humanoid.Animator:LoadAnimation(script:WaitForChild(“panicanim”))

trigger.Touched:Connect(function(hit)
if hit then
if debounce == false then
debounce = true
trigger:Destroy()
r_anim:Play()
p_anim:Play()
r_anim.Stopped:Wait()
p_anim.Stopped:Wait()
wait(30) – animation lenght
debounce = false
end
end
end)

2 Likes

If it’s R6, try turning the Massless property off for the limbs (excluding the HumanoidRootPart).

Edit: I mean’t Massless.

If the character sinks into the floor, that usually means the HipHeight is too low. Make sure CanCollide = true on the HumanoidRootPart, and make sure the Humanoid’s AutomaticScalingEnabled property is true.

Tried it but i didnt really work. Character doesnt sink now but the position of it is not the same as it was in the animation. I think it could’ve been caused by the CFrame issue since i didnt animate the CFrames i just animated the limbs of the character. Thanks for the advice.

Is the position of the rig in the same spot where you animated it?

Yeah it is i found some methods to try out havent tried them but thanks for help!

you’re welcome! lmk how that turns out