I already tried doing this and it did not work.
I used a LocalScript Here is my script:
1 | wait() |
2 | while true do |
3 | wait() |
4 | script.Parent.Position = UDim 2. new(script.Parent.Parent.TextButton.Position) |
5 | end |
Any help would be appreciated, thanks.
You don't need to create a new UDim2 instance because TextButton
's position property is a UDim2 value. https://developer.roblox.com/en-us/api-reference/class/TextButton If you go to that link and scroll to position, you can see it says "UDim2."
So, the script would look like this:
1 | wait() |
2 | while true do |
3 | wait() |
4 | script.Parent.Position = script.Parent.Parent.TextButton.Position |
5 | end |