-
What do you want to achieve? Keep it simple and clear!
I want to be able to tween a selector to align with items affected by an UIListLayout
I want to make the selector move up and down using the mouse scroll.
When the scroll moves up, the index would increase by 1 & vice versa.
I tried to set the goal of the tween to one of the frames’s AbsolutePosition, but after i tested and some research, seems like AbsolutePosition is inaccurate, and i cant be relied on. -
What is the issue? Include screenshots / videos if possible!
i cant figure out a method to determine the position of the ui object. -
What solutions have you tried so far? Did you look for solutions on the Creator Hub?
I searched for posts regarding this, and they all dont seem to mention tweening.
Can you explain what you meant by the AbsolutePosition working “unreliably”? A video of this “unreliable” behavior would help!
After some research, i have found the reason why AbsolutePosition is inaccurate, seems like the property does not respect the GUI Inset. Fortunately i also found a method to calculate the Inset’s size:
I haven’t tested the method yet, but i appreciate you for offering me help. Thank you ![]()
Sorry to bump this post, but how exactly did you fix the issue? Because I am having the same problem you had.
AbsolutePosition works fine. It’s just not updating as fast as you may wish. Simply add a task.wait():
task.wait()
local pos = frame.AbsolutePosition
Hey, i apologize for the late response. The post i embedded on my latest reply does work fine for me. You should try it out and perchance i can help with some minor issues.
you can do something like this
local inset = GuiService:GetGuiInset() --// returns a vector2
local finalPos = Frame.AbsolutePosition + inset
