I’m trying to connect multiple points (waypoint in this case) together using LineHandleAdornment
My current issue is that I can get the proper angles and everything links together properly, but the lines are way off-center and rotated.
https://gyazo.com/b0acfc78f91bc8024ef50dc36fc59454
This is where the lines should be
https://gyazo.com/a3a36d639fbf9b3b42c47e6b9f42a2df
And here you can see they’re all the way off the map
Code:
for n, waypoint in pairs(waypoints) do
if n ~= #waypoints then
local beam = Instance.new("LineHandleAdornment")
local nextpoint = waypoints[n+1]
beam.Color3 = color
beam.Thickness = 5
print(nextpoint.Position)
local mag = (waypoint.Position - nextpoint.Position).Magnitude
beam.Length = mag
beam.CFrame = (CFrame.new(waypoint.Position, nextpoint.Position))
beam.AlwaysOnTop = true
beam.Adornee = destroyablepings[#destroyablepings]
beam.Parent = destroyablepings[#destroyablepings]
beam.ZIndex = 2
end
end
I have worked with LineHandleAdornment before, but this was never quite an issue