I want to tween these characters to the position of the enemy, which is easily doable, but each attack has a ‘range’ stat that determines how far away they should stop from them before they perform their attack
Currently, they’ll just travel to the exact position of the enemy, but I want to offset the goal location based on the range, which also has be in line with the travelling units LookVector, and I’m not sure how to do it
-- 'Location' is the position of the targets Root Part
local Range = 5
local CloseGapTween = TweenService:Create(RootPart, TweenInfo.new(Magnitude / 50, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {Position = Vector3.new(Location.X, RootPart.Position.Y, Location.Z)})
-- Based on the range being 5, I'd like to change the goal position 5 studs before that point, in line with the units Look Vector.