You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve?
make the motor6d correctly follow the position of the Dummy(Model) in the x axis -
What is the issue?
the motor6d does not seem to follow the dummy correctly, it wont look at the dummy.
Here’s a recorded video of the problem -
What solutions have you tried so far?
I have tried using cframe.lookat but that just makes it go to the void
Code:
local tween = game:GetService("TweenService")
local module = require(script.getNearest)
local model = script.Parent
local neck = model.Head.Neck
local nC0 = neck.C0
local tin = TweenInfo.new
while task.wait() do
local ae = module:getNearbyModels(1000,model:GetPivot().Position,{model})
if ae ~= {} then
local pos = ae[1]:GetPivot().Position
tween:Create(neck,tin(.1),{C0 = nC0 * CFrame.new(Vector3.new(0,0,0),pos)}):Play()
end
end