I want to load and play an animation from the client but it’s not being replicated to the server.
Screenshots:
Client:
Server:
Scripts:
-- Server Script in ServerScriptService --
local Stand = game.ServerStorage.Stand
game.Players.PlayerAdded:Connect(function(Plr)
Plr.CharacterAdded:Connect(function(Char)
wait(.5)
local Clone = Stand:Clone()
local AnimC = Instance.new("AnimationController")
local Animator = Instance.new("Animator")
Animator.Parent = AnimC
AnimC.Parent = Clone
local WC = Instance.new("WeldConstraint")
Clone.HumanoidRootPart.CFrame = Char:WaitForChild("HumanoidRootPart").CFrame
WC.Part0 = Char["HumanoidRootPart"]
WC.Part1 = Clone["HumanoidRootPart"]
WC.Parent = Clone["HumanoidRootPart"]
Clone.Parent = Char
for _,Obj in pairs(Clone:GetDescendants()) do
if Obj:IsA("BasePart") and Obj:IsDescendantOf(workspace) then
Obj.Anchored = false
Obj:SetNetworkOwner(Plr)
end
end
end)
end)
-- Local Script in StarterCharacterScripts --
local Stand = script.Parent:WaitForChild("Stand")
local AnimC = Stand:FindFirstChildOfClass("AnimationController")
local Anim = Instance.new("Animation")
Anim.AnimationId = "rbxassetid://4489461200"
local Track = AnimC:LoadAnimation(Anim)
Track:Play()