Character bugs on server while tweening HumanoidRootPart

When im tweening character’s hrp (in the module script called from a server), it all seems to work fine, until we take a look of it from the server side.

  1. This is how it looks from the client side (all clients)
  2. And this is how server views it (due to this other moves do not work properly)

Code:

	character.HumanoidRootPart.Anchored = true
	
	local boom = game.ReplicatedStorage.Assets.Coin:Clone()
	boom.Position = character:FindFirstChild("Right Arm").Position + Vector3.new(0,2,0)
	boom.Anchored = true
	boom.Parent = workspace
	
	local speed = 1
	rs.Heartbeat:Connect(function()
		local rotSpeed = speed
		boom.Orientation = boom.Orientation + Vector3.new(0,speed,0)
	end)
	task.wait(1)
	local tween = ts:Create(boom,TweenInfo.new(8),{Size = Vector3.new(10,100,100),Position = boom.Position + Vector3.new(0,100,0)})
	local tween2 = ts:Create(character.HumanoidRootPart,TweenInfo.new(8),{Position = character.HumanoidRootPart.Position + Vector3.new(0,50,0)}) -- here is hrp tween
	tween:Play()
	tween2:Play()
	tween.Completed:Connect(function()
		for i = 1,50,5 do
			speed = i 
			task.wait(.2)
		end
		local anim = character:FindFirstChild("Humanoid").Animator:LoadAnimation(script.Animations.DESTROY)
		anim:Play()
		anim.KeyframeReached:Connect(function()
			boom:Destroy()
			anim:AdjustSpeed(0)
			task.wait(.2)
			character.HumanoidRootPart.Anchored = false
			rg.DurationRagdoll(character,5)
			anim:Stop()
		end)
	end)

Feel free to ask questions!

Try to tween the CFrame property of the HRP instead of Position

1 Like

This could probably be due to network replication issues. What if you try to use a physics constraint instead of tweening?

Its actually crazy how i didnt even think about this. Thank you.

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