Hi ! So actually i maked a script just make npc Follow me like this
But, i I would like there to be less distance between me and the npc except that, I don’t want it to move faster
I try to mix my script with other script on the form using BodyPosition and Gyro but is nor work so i make this post
This is my actual code
--local Run = game:GetService("RunService")
--Run.Heartbeat:Connect(function()
--script.Parent.CFrame = script.Parent.Parent.Parent:WaitForChild("HumanoidRootPart").CFrame * CFrame.new(3,2,2)
--end)
local Huma = script.Parent.Parent.Parent:WaitForChild("HumanoidRootPart")
local Model = script.Parent
--Run.Heartbeat:Connect(function()
--wait()
--local p = Huma.CFrame * Vector3.new(2,2,2)
--Model.BodyGyro.CFrame = Huma.CFrame
--Model.BodyPosition.Position = Vector3.new(p.x, p.y, p.z)
--end)
while wait() do
local p = Huma.CFrame * Vector3.new(2,2,2)
Model.BodyGyro.CFrame = Huma.CFrame
Model.BodyPosition.Position = p
end
-- local RunService = game:GetService("RunService")
-- RunService.RenderStepped:Connect(function()
--local p = Huma.CFrame * Vector3.new(2,2,2)
--Model.BodyGyro.CFrame = Huma.CFrame
--Model.BodyPosition.Position = Vector3.new(p.x, p.y, p.z)
--end)
The comment code line is old version (bad)