Animation on object not running on server

Hi! I’m having some trouble running an animation on a part. All I’m trying to do is tween the container part, load an animation into the container, and play it. The following code is inside a server script:

local foodRemote = game.ReplicatedStorage.RemoteEvents.DetectFoodEat
local click = script.Parent.ClickDetector
local TweenS = game:GetService("TweenService")

-- Food variable is temporarily hard-coded for testing purposes
	local food = game.Workspace["Food System"].Workspace.Table.Placemats.Mat.TinySide.FruitCrumble

	local char = player.Character
	local hum = char:WaitForChild("Humanoid")
	local container = food.Container
	container.Anchored = true

	local foodAttach = char.Torso:WaitForChild("FoodAttach")
	local newInfo =

	local foodTween = TweenS:Create(container,newInfo,{
		CFrame =,foodAttach.WorldAxis)

	local foodClone = food:Clone()
	foodClone.Parent = player.Character
	foodClone.Name = "AnimFood"
	local cloneContainer = foodClone.Container
	local animation ="Animation")

-- The animation id is set to the correct animation in the real script
	animation.AnimationId = "rbxassetid://0000000000"
	local controller ="AnimationController",cloneContainer)
	local containerTrack = controller:LoadAnimation(animation)

There are no errors in the output, and all the variables seem to be correct. The tweeting is working fine, the food model is being cloned, and the AnimationController is being created, but the animation is never playing on the client or on the server.

The food remote event is firing, but I’ve commented out everything there for testing purposes, so that’s not interfering at all.

Any assistance would be greatly appreciated!

Parent the animation controller to the part itself.

Thank you for your suggestion, but it still did not work on the server or the client.