Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Image label's position keeps changing to {0, 0},{0, 0}. How do I fix this?

Asked by 6 years ago

In the script below I tried to change the image label's position. But it keeps changing to {0, 0},{0, 0} other than changing it to the desired position. How do I fix this?

arrow = script.Parent.Parent:WaitForChild('PlayArrow')

    arrow.Position = UDim2.new({0, 0},{0.2, 0})
wait(0.05)
    arrow.Position = UDim2.new({0.05, 0},{0.2, 0})
1
remove the { and} they are only used in studio. Use Udim2.new(0, 0, 0.2, 0) instead. User#5423 17 — 6y
0
pls don't answer in comments. cabbler 1942 — 6y
0
@cabbler This question can be answered in a comment as it is just a user error which is simply fixed. User#5423 17 — 6y

1 answer

Log in to vote
0
Answered by
Aresko 53
6 years ago

It looks like your issue is copying and pasting the brackets from the properties panel, to fix this just remove the brackets.

arrow = script.Parent.Parent:WaitForChild('PlayArrow')

arrow.Position = UDim2.new(0, 0, 0.2, 0)
wait(0.05)
arrow.Position = UDim2.new(0.05, 0, 0.2, 0)
0
True. SkatePro888899999 5 — 6y
Ad

Answer this question