Answered by
6 years ago Edited 6 years ago
Do not put a extra "UDim2.new()", since "testloc" is already a UDim.
Here's the code to fix it:
1 | local test = script.Parent.Parent.Main.Arrows.LeftA |
2 | local testloc = script.Parent.Parent.Main.Receptors.Left.Position |
4 | test:TweenPosition(testloc) |
Also, as the other answer says you need to put the other requirements, they're actually optional. That is to make them look even neater.
If this works, please click the "Answer" button just to make sure it helps you.
If you are still getting errors, tell me.
EDIT: Since it's using different frames, here's a fix.
Using AbsolutePosition, it should find where it is
1 | local test = script.Parent.Parent.Main.Arrows.LeftA |
2 | local testloc = script.Parent.Parent.Main.Receptors.Left |
4 | test:TweenPosition(UDim 2. new( 0 ,test.AbsolutePosition.X-testloc.AbsolutePosition.X, 0 ,test.AbsolutePosition.Y-testloc.AbsolutePosition.Y)) |
NOTICE: I didn't test this, it should work tho.