Tween is not replicating onto client

Tween of shaking a model on the server is not replicating onto the client.

(video was too big)
Video: Kapwing — Create more content in less time

--shake function; connected to base.Humanoid.HealthChanged
local cycleDuration = 0.05
local totalDuration = 0.1
local volatility = .5
function npcModule.shakeBase(base)
	
	local randomMove = Vector3.new(math.random(),0,math.random()).Unit
	local shakeLeft = 0
	for i, part in pairs(base.ShakeParts:GetDescendants()) do
		if part:IsA("BasePart") then
			coroutine.wrap(function()
				shakeLeft += 1
				local savedPosition = part.Position
				local tweeninfo = TweenInfo.new(
					cycleDuration,
					Enum.EasingStyle.Linear,
					Enum.EasingDirection.Out,
					0,
					false,
					0
				)
				for i = 0, totalDuration - cycleDuration, cycleDuration do
					local tween = TS:Create(
						part,
						tweeninfo,
						{Position = savedPosition + randomMove * volatility}
					)
					tween:Play()
					tween.Completed:Wait()
				end
				TS:Create(
					part,
					tweeninfo,
					{Position = savedPosition}
				):Play()
				shakeLeft -= 1
			end)()
		end
	end
	repeat task.wait() until shakeLeft == 0
end

I want to make it so it also shows up on the client. The tween is happening server side.

Anything that happens on the server will also happen on the client

I know this but it did not for some reason. Next time please check the video for more context. I look at the server side the tween plays while on the client it doesn’t play.

That just not possible though. Unless something is stopping the tween on the client

played the tween in the client

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