Hi! I am making a NPC that walks to destination and facing to them, but error is occurring at facing.
local HumanoidRootPart = script.Parent.HumanoidRootPart
local Tween = TweenService:Create(HumanoidRootPart, TweenAnimation, {CFrame = CFrame.new(HumanoidRootPart, NearestPart.Position)})
Tween:Play()
As you can see, first argument is object, and TweenService:Create()'s first argument is instance(object).
so, I think It is right. but error occurred:
15:09:06.969 - Workspace.NPC.NPC:40: bad argument #1 (Vector3 expected, got Object)
15:09:06.969 - Stack Begin
15:09:06.969 - Script ‘Workspace.NPC.NPC’, Line 40
15:09:06.969 - Stack End
What am I wrong? or do you have a better opinion to letting NPC facing to the part?
*also variable “TweenService” and “TweenAnimation” is decleared correctly.