You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? I want to change the size of the frame to the position of the farthest frame away no matter what size.
-
What is the issue? I am unsure how to do this.
-
What solutions have you tried so far? I have done some searching around and I am overall not sure how to achieve this. I have come up with a few solutions that do not work.
I am trying to determine how far 2 frames are from each other and then making a line between them matching them up no matter what size they are but I cannot seem to achieve this. Can I get some help?
local Frame1 = Instance.new("Frame")
Frame1.Position = UDim2.new(0,0,0.05,0)
Frame1.Size = UDim2.new(0.1,0,0.07,0) or UDim2.new(0.15,0,0.07,0)
Frame1.Name = "Start"
Frame1.Parent = script.Parent
local Line = Instance.new("Frame")
Line.Name = "Line"
Line.Position = UDim2.new(0.5,0,0.05,0)
Line.Size = UDim2.new(0.1,0,0.07,0)
Line.BackgroundTransparency = 0.7
Line.Parent = Frame1
local Frame2 = Instance.new("Frame")
Frame2.Name = "Finish"
Frame2.Position = UDim2.new(0.5,0,0.05,0)
Frame2.Size = UDim2.new(0.1,0,0.07,0)
Frame2.Parent = script.Parent
local distance = (Frame2.AbsolutePosition - Frame1.AbsolutePosition).magnitude
print(distance)
--Move line to distance.
Line:TweenSize(UDim2.new(distance, 0, Line.Size.Y.Scale, 0), "Out", "Linear", 0.16)
--??