Plotting a line between 2 Frames


How would you plot a line between 2 given nodes with a Frame and calculate its rotation and size whilst taking your screen size (viewport size) into account? Here is what I have so far

local Connector =  {}
Connecter.__index = Connector

function Connecter.new(Node1, Node2)
    local self = setmetatable({
        Origin = Node1.Position,
        End = Node2.Position
    }, Connector)
    return self
end

function Connecter:RenderLine()
    local ViewportSize = workspace.CurrentCamera.ViewportSize
end

return Connector

Try checking this:

See which works better with you.

2 Likes