Hello, so yesterday I posted a topic regarding meshes following the player and rotating where the player is headed towards. But now I have another problem. I added an animation that plays forever to the mesh and now, the mesh is not rotating. Below is the local script (placed in starter character scripts) that makes the mesh follow you around.
local Humanoid = script.Parent.HumanoidRootPart local player = game.Players.LocalPlayer local distance = 5 local CommonChiiken = workspace.CommonChiiken.ChiikenHelpAnimate local Follower = Humanoid local RunService = game:GetService("RunService") local Pets = player:WaitForChild("Pets") local CommonValue = Pets.CommonChiiken if CommonValue.Value == true then RunService.Heartbeat:Connect(function() CommonChiiken.CFrame = Follower.CFrame*CFrame.new(0, 5, distance) CommonChiiken.CFrame = CFrame.new(CommonChiiken.CFrame.X, Follower.CFrame.Y + 2, CommonChiiken.CFrame.Z) CommonChiiken.CFrame = CFrame.lookAt(CommonChiiken.Position,Follower.Position - Follower.Position * 2) task.wait() end) task.wait() end
This next script plays the animation. It is located in the mesh that follows you.
I got this script from another topic. The topic was just about how they can play animations in a skinned mesh. I will not link the topic here because I think it’s pretty useless. Just ask if you want the topic, then I will hyperlink it to you.
local animationId = "rbxassetid://12391895996" local animation = Instance.new("Animation") animation.AnimationId = animationId local hum = script.Parent.Humanoid local animator = hum.Animator local animationTrack = animator:LoadAnimation(animation) animationTrack:Play()
Honestly, I don’t think anybody can fix this. I just think this is just the animation preventing it from rotating. But if you can fix it, thank you. Any help is appreciated.