Im trying to make a orb effect where it tweens to the player but i dont know how to make it where it keeps following the players humanoid root part untill it touches the rootpart
this is the function i have in a module
function module.SpawnOrb(SpawnPosition : Vector3,PartToTouch : Part)
local Info = TweenInfo.new(.65,Enum.EasingStyle.Back,Enum.EasingDirection.In,0,false,0)
local Info2 = TweenInfo.new(.25,Enum.EasingStyle.Exponential,Enum.EasingDirection.In,0,false,0)
local Orb = game.ReplicatedStorage.FX.MoneyOrb:Clone()
Orb.Parent = game.Workspace
Orb.Transparency = 1
local FadeTween = TweenService:Create(Orb,Info2,{Transparency = 0})
Orb.Position = SpawnPosition
FadeTween:Play()
FadeTween.Completed:Connect(function()
local MoveTween = TweenService:Create(Orb,Info,{CFrame = PartToTouch.CFrame})
MoveTween:Play()
MoveTween.Completed:Connect(function()
local FadeOutTween = TweenService:Create(Orb,Info2,{Transparency = 1})
FadeOutTween:Play()
wait(1)
Orb:Destroy()
end)
end)
end