Okay, so I have a script that is tweening in and out, how would I indentify the current position because it says positions is not a property of Scrollingframe.
Code:
if playerGui.InfoPanel.ScrollingFrame:Position(0.5, -250,0.5, -200)
Okay, so I have a script that is tweening in and out, how would I indentify the current position because it says positions is not a property of Scrollingframe.
Code:
if playerGui.InfoPanel.ScrollingFrame:Position(0.5, -250,0.5, -200)
Position of a GuiObject is a UDim2 type.
You are trying to access it as a function, but it is a property. A property can be accessed by using ., such as ScrollingFrame.Position. To check if the position is equal to something, you have to create a UDim2 to compare it to.
Here is what you could do:
if playerGui.InfoPanel.ScrollingFrame.Position == UDim2.new(0.5, -250, 0.5, -200) then
Hope this helps! :)
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
Yeah this didnt work for me.
Try Vector2. If this doesn't work, then try rearranging your script cause either Vector2 or UDim2 should work.
You were correct!!