Hello everyone, I am trying to make a button that moves a ScrollingFrame to a set vector 2 (canvas position)
It works great but it doesnt work on other screen sizes, and I can’t figure out the math for it.
This is what I have right now:
local CanvasPos = v:GetAttribute("CanvasPosition")
if not CanvasPos then
continue
end
local function moveCanvasToPoint()
local Tween = TweenService:Create(Elements, TweenInfo.new(.3), {
CanvasPosition = Vector2.new(0, CanvasPos.Y * (ViewPortSize.Y / v.Position.Y.Scale))
})
Tween:Play()
end
v.MouseButton1Click:Connect(moveCanvasToPoint)
Appreciate it.