How can I make points that are constantly x amount of studs away from a player?

I’m working on a mechanic for my game and I’d like to have 5 points that are all x amount of studs away from a player at all times. I’m unsure how to go about it, but I was wondering if I could make a coordinate system where the player is always the origin (0,0) and all the points are around them at predetermined points such as (0, 50) or so on (no matter where the player moves, the points will always be at the same coordinate). I’d prefer to do this without having parts serve as the points, I just want the points to be intangible.

The “origin (0,0)” can be the Torso’s position.
The 5 offset positions can be vector3s stored in a table, not physical parts.

-- instead of having 5 variables, you can access the 5 positions with positions[x]
local positions = {vector3.new(0,0,0),vector3.new(0,0,0),vector3.new(0,0,0),vector3.new(0,0,0),vector3.new(0,0,0)}
Torso:GetPropertyChangedSignal("Position"):Connect(function(value)
    -- value is the updated Torso position
    positions[1] = value + vector3.new(50,0,0)
    positions[2] = value + vector3.new(3,12,80)
    positions[3] = value + vector3.new(50,90,45)
    positions[4] = value + vector3.new(45,67,3)
    positions[5] = value + vector3.new(12,5,60)
end)

Did not test this*

2 Likes

You should actually have the origin be the humanoid’s root part, not the torso, because the torso’s position is constantly changing due to animation.

1 Like

Looks good, I’m working with the idea right now and I think I can adapt it to my needs.

1 Like