Issue with tweening

I’m currently trying to make an NPC which moves from side to side, but for some reason the following code causes the NPC to raise up into the air, even though the position is to the left of him, could anyone help?

local targets = workspace:WaitForChild("Targets")

local tweenservice = game:GetService("TweenService")

local tweenInfo = TweenInfo.new(
	4,
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.In,
	0,
	false,
	0
)

local goals = {
	Position = Vector3.new(-148.325, 1.247, 60.709);
}

local moveTween = tweenservice:Create(targets.Tim.HumanoidRootPart, tweenInfo, goals)

moveTween:Play()

humanoid:moveto() is more better, try that instead.

1 Like

Yeah but I want it to slowly move there, I’m pretty sure :MoveTo() instantly moves the character.

No I said humanoid:moveto() not model:moveto()

Humanoid:moveto() actually makes the character walk, look it up

1 Like

are u sure the y axis is right?

1 Like

Yeah it is, I placed a part where I wanted it to go and copied the position.

i have done tweens before and this just sounds impossible

could it be another code that rises it to air?

1 Like

No, there’s no other scripts.
aaaaa

ok make a part where u want it to move and then in the script put goals = {Position = thepartumade.Position}

I’ve already done that, it does the exact same.