Before you ask, yes, I have followed through with @Headstackk’s tutorial on animating tools.
I am trying to make an animation in which it is the idle animation of you holding a pizza.
The animation works fine, however, the pizza isn’t moving in the animation.
Here is the (server, not local) script:
game.Players.PlayerAdded:Connect(function()
game.ReplicatedStorage.PlayerJoined:FireAllClients() -- This remote event will give me the player reference.
end)
local function playAnim(anim, char)
char:WaitForChild("Humanoid").Animator:LoadAnimation(anim):Play()
end
game.ReplicatedStorage.PlayerJoined.OnServerEvent:Connect(function(player)
local character = player.Character
local pizza = game.ReplicatedStorage.ModlyPizza.Crust
local pizzabase = game.ReplicatedStorage.ModlyPizza:Clone()
local pizza = pizzabase.Pizza
pizzabase.Parent = player.Character
local motor6D = Instance.new("Motor6D")
motor6D.Parent = pizza
motor6D.Part0 = character:WaitForChild("LeftHand")
motor6D.Part1 = pizza
playAnim(game.ReplicatedStorage.HoldingPizza, character)
print("Player joined")
end)