so i have a snake which needs to move along the Z axis to look like a chase sequence.
but uhh. i believe he is kinda too heavy because, he isn’t moving, his animation is just playing.
local Humanoid = script.Parent
local WalkTrack = Humanoid:LoadAnimation(Humanoid:WaitForChild("Moving"))
local Character = Humanoid.Parent
local RunService = game:GetService("RunService")
local function RigDistance()
local Distance = (Character.Parent.Rig.PrimaryPart.Position - Character.PrimaryPart.Position).Magnitude
if Distance <= 10 then
if Character.Parent.Rig.Humanoid.Health <= 0 then return end
Character.Parent.Rig.Humanoid:TakeDamage(100)
end
end
Humanoid:MoveTo(Character.Parent.Rig.PrimaryPart.Position)
WalkTrack:Play()
for i, v in pairs(Character:GetChildren()) do
if not v:IsA("Part") then continue end
v.Touched:Connect(function(hit)
if hit.Name == "FireBall" then hit:Destroy() end
end)
end
RunService.Heartbeat:Connect(RigDistance)
yes they’re all unanchored since i just spawned basic parts to create him,
the only difference in properties his parts and a normal roblox part you spawn have , is color, and massless is set to true, but the rest are all basic properties.
I have had problems with movinng humanoids, maybe try naming a PART, that is inside the snake model: HumanoidRootPart, as this once fixed the problem for me
(Or create a new part that is called HumanoidRootPart)