Tweening HumanoidRootPart makes the camera jitter

Hi Devs,

I’m trying to tween the HumanoidRootPart above the plate they were previously on if they jumped off of it to go down slowly, however, the camera is extremely jittery, and I’m not sure why. Could someone help me, please? I’d appreciate it! :slight_smile:

local CollectionService = game:GetService("CollectionService")
local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")

for _, fallBreaker in CollectionService:GetTagged("FallBreaker") do
	fallBreaker.Touched:Connect(function(hit)
		local Success, Error = pcall(function()
			if hit.Parent.Humanoid then
				local player = Players:GetPlayerFromCharacter(hit.Parent)
				local HRP = hit.Parent.HumanoidRootPart
				HRP.Anchored = true
				HRP.Position = Vector3.new(player:GetAttribute("lastPlate").X, player:GetAttribute("lastPlate").Y + 100, player:GetAttribute("lastPlate").Z)
				local Tween = TweenService:Create(HRP, TweenInfo.new(4, Enum.EasingStyle.Circular, Enum.EasingDirection.Out), {Position = Vector3.new(player:GetAttribute("lastPlate").X, player:GetAttribute("lastPlate").Y, player:GetAttribute("lastPlate").Z)})
				Tween:Play()
				Tween.Completed:Wait()
				HRP.Anchored = false
			end
		end)
		
		if not Success then
			print("Humanoid was attempted to be found inside accessory. Feel free to ignore this.")
		end
	end)
end

Do not tween a players character. Or any active character rig at all. Instead use a physics constraint (specifically AlignPosition) that should fare a lot better with what you’re trying to achieve

3 Likes

Ohh okay! I’ll check that out! Hopefully I’ll find success in it.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.