0

# How to script movement for a simple imported character?

I have imported a simple Soldier rig from Blender. The Rig is animated and I need it to move like a normal roblox character would do. I have tried scripting like:

while true do
Soldier.RootPart.CFrame=Soldier.RootPart.CFrame*CFrame.new(0,0,-0.1)
wait(0.1)
end


This makes the Character move but it doesn't work when going uphill/downhill. I just need to know how to make the Soldier Character move around like Normal Roblox Characters. Any help is Highly Appreciated. Thanks in Advance.

1
you can use humanoid:moveto() JustinWe12 723 — 16d
0
Humanoid:Moveto() or Humanoid:Move didn't work at all, because the rig is imported. Its neither R6 or R15. Its a skinned mesh with 64 Bones, including fingers. Please help I'm struggling with this question Shounak123 461 — 16d

0
Edited 16 days ago

You can use Humanoid:MoveTo() just as what @JustinWe12 said, but Humanoid:Move() is much preferred if you want a humanoid to walk in a direction.

-- Normal Script inside the Soldier Character
local Solder = script.Parent
local Humanoid = Solider:FindFirstChildOfClass("Humanoid")

for _, limb in ipairs(Soldier:GetDescendants()) do
if limb:IsA("BasePart") then -- if it's a limb (Part, MeshPart, Union, Accessory, etc.)
limb:SetNetworkOwner(nil) -- so the solider won't lag
end
end

if limb:IsA("BasePart") then -- if it's a limb (Part, MeshPart, Union, Accessory, etc.)
limb:SetNetworkOwner(nil) -- so the solider won't lag
end
end)

while true do
Humanoid:Move(Solider:GetPivot().LookVector) -- makes soldier walk forward