MoveTo Model doesn't align with the waypoint

  1. What do you want to achieve? Keep it simple and clear!
  • I have a Animatronic AI and i want it to align with the waypoint
  1. What is the issue? Include screenshots / videos if possible!

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

Yes, nothing is helpful.

local function randomWaypoint()
	local randomWaypoint = waypoints:GetChildren()[math.random(1,#waypoints:GetChildren())]
	redbear:MoveTo(randomWaypoint.Position)
	redbear.pose.Value = randomWaypoint.Name
end

I only want the Fix Code for it, nothing else.

Thanks

  • Pop

Are you trying to have it where the AI bot is facing the other way?

Yes, i want it to face the waypoint’s direction. Like he’s facing the wall, but i want it to be where the blue drawing is.

I’ve tried this but it’s still facing the other direction.

local function randomWaypoint()
	local randomWaypoint = waypoints:GetChildren()[math.random(1,#waypoints:GetChildren())]
	--redbear:MoveTo(randomWaypoint.Position)
	redbear:PivotTo(randomWaypoint.CFrame * CFrame.Angles(math.rad(0), math.rad(randomWaypoint.Orientation.Y),math.rad(0)))
	redbear.pose.Value = randomWaypoint.Name
end

I keep getting the same error, try something like.

humanoidrootpart.CFrame = CFrame.lookAt(posx, posy, posz)

Ok nevermind, i had to clone them all, put them in the waypoints positions and put them in a folder. It was my only solution because nothing worked.

Thanks for your help tho

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.