Script works fine on the server but not on the client?

So i have this system where it tweens 2 parts to different positions, and theres npc characters roped to the part to give it a outfit conveyor kind of feel, but the npc’s dont move with it

local lol = "e"

local g1 = game.Workspace.OutfitCon.Group1.Part
local g2 = game.Workspace.OutfitCon.Group2.Part

local dog = false

local TweenService = game:GetService("TweenService")


--send g1 to mid
local Info = TweenInfo.new(
	2,                             -- Length
	Enum.EasingStyle.Linear,      -- Easing Style
	Enum.EasingDirection.Out,      -- Easing Direction
	0,                             -- Times repeated
	false,                          -- Delay
	0
)

local Goals =
	{

		Position = game.Workspace.OutfitCon.MidPart.Position;
	}

local tween = TweenService:Create(g1,Info,Goals) 

-- send g1 to end

local Info = TweenInfo.new(
	2,                             -- Length
	Enum.EasingStyle.Linear,      -- Easing Style
	Enum.EasingDirection.Out,      -- Easing Direction
	0,                             -- Times repeated
	false,                          -- Delay
	0
)

local Goals =
	{

		Position = game.Workspace.OutfitCon.EndPart.Position;
	}

local tween2 = TweenService:Create(g1,Info,Goals) 

--send g2 to mid
local TweenService = game:GetService("TweenService")

local Info = TweenInfo.new(
	2,                             -- Length
	Enum.EasingStyle.Linear,      -- Easing Style
	Enum.EasingDirection.Out,      -- Easing Direction
	0,                             -- Times repeated
	false,                          -- Delay
	0
)

local Goals =
	{

		Position = game.Workspace.OutfitCon.MidPart.Position;
	}

local tween3 = TweenService:Create(g2,Info,Goals) 

-- send g2 to end
local TweenService = game:GetService("TweenService")

local Info = TweenInfo.new(
	2,                             -- Length
	Enum.EasingStyle.Linear,      -- Easing Style
	Enum.EasingDirection.Out,      -- Easing Direction
	0,                             -- Times repeated
	false,                          -- Delay
	0
)

local Goals =
	{

		Position = game.Workspace.OutfitCon.EndPart.Position;
	}

local tween4 = TweenService:Create(g2,Info,Goals) 

while true do
	if lol == "e" and dog == false then
		dog = true
		g1.Position = game.Workspace.OutfitCon.StartPart.Position
		wait()
		tween:Play() --- ERROR
		wait()
		wait(10)
		tween2:Play()
		wait()
		lol = "f"
		dog = false
	else
		if lol == "f" and dog == false then
			dog = true
			g2.Position = game.Workspace.OutfitCon.StartPart.Position
			task.wait()
			tween3:Play()
			task.wait()
			task.wait(10)
			tween4:Play()
			task.wait()
			lol = "e"
			dog = false
		end
	end
end

video on server

robloxapp-20220816-1355559.wmv (1.0 MB)

video on client

robloxapp-20220816-1355377.wmv (1.2 MB)

1 Like

Possible that Networkownership is the problem?