So i tried making a humanoid:MoveTo() but it just refuses to work no matter what i do.
Ive tried several solutions but all mention the HumanoidRootPart, which has no issues and ive checked several times, even with a previously functional humanoid.
Similarly, i’ve failed to use Humanoid.WalkToPart and it doesnt work either.
If anyone has any experience with this issue please help.
Too uninformative. First, can you show the source code of the original way you tried using the MoveTo() function? Second, show a video (if possible) of how it doesn’t work (ex: not moving after running), if you can’t, describe how it is when you press run?
while script.Disabled == false do
script.Parent.Humanoid:MoveTo(script.Parent.HumanoidRootPart.Position + Vector3.new(math.random(10,-10), math.random(10,-10), math.random(10,-10)))
script.Parent.Humanoid.MoveToFinished:Wait(2)
end
It doesnt work because nothing happens,
and when i press run nothing happens.
I know it isnt connected to the ground because i can move it with my own character.
Why are you checking if the script isn’t disabled because even if it was it wouldn’t be able to check because it’s disabled?
Your issue is that when your adding Vector3 values to your position you also have it adding to the Y value (up or down) which means it has a chance to tell it to go 6 feet up or -3 feet down, when it can’t, therefore the issue.
Then there is something wrong with your humanoid or code, try this refactor (clear your code and replace it with this) If it doesn’t work, it’s something 100% wrong with your Humanoid model.
local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")
local Root = Character.PrimaryPart
local RandomValueRange = 10 -- // Change this to whatever you want (no -# values)
local function Move()
Humanoid:MoveTo(Root.Position + Vector3.new(math.random(RandomValueRange*-1,RandomValueRange), 0, math.random(RandomValueRange*-1,RandomValueRange)))
Humanoid.MoveToFinished:Wait()
end
-- // Could put in while loop or whatever you wanna do
Move()
Worked for me just fine.
Edit: fixed something that could’ve been problematic
thank you but overall nothing is working, it could be a problem with the humanoid but
(this is both i tested it on)
humanoid properties are fine, i have no idea what to do at all augh
(HOLD ON NEVERMIND SOMETHINS GOIN ON FAITH RESTORED
after further testing the second one i used it on worked but not the first which is nice but i need to look into whats wrong with the first because thats what im trying to code