What do you want to achieve?
I currently have a vector, this vector is a starting position, I need to move that vector diagonally from its current location.
-
What is the issue?
The Vector will move the same direction every time, no matter orientation, etc… I need it to move away from the part each time.
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Making it CFrames, etc…
Here is a picture of what currently is happening.

Here is a picture of what needs to happen.
Here is a gif of what it looks like in game.
1 Like
have you tried tweening the position?
Tweening the position wouldn’t really help here; I’m having trouble finding out what the new vector position would actually be.
2 Likes
So, what you’re trying to say is that you just need to know the new vector position? And you’re not moving it?
You could expand directly away from the center of the part by taking the position of the part and the position you want to expand from, subtracting the two, multiplying a .Unit of that by the .Magnitude of your relative vector, and finally adding it back to your original corner position. That should be all you need:
local relativeVector = -- your relative vector
local function getNewDotPosition(
part, -- part
cornerPosition -- position you chose to expand from
)
return cornerPosition + (cornerPosition - part.Position).Unit * relativeVector.Magnitude
end
-- usage
dot.Position = getNewDotPosition(part, cornerPosition)
You can also replace your relative vector’s magnitude with any suitable constant if you need, like say 3.
That being said, the process for getting the new dot position can be optimized if I know how you got that relative vector in the first place. From there, the magnitude could be found from there instead of ever having to find the relative vector.
1 Like