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 7 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?

1arrow = script.Parent.Parent:WaitForChild('PlayArrow')
2 
3    arrow.Position = UDim2.new({0, 0},{0.2, 0})
4wait(0.05)
5    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 — 7y
0
pls don't answer in comments. cabbler 1942 — 7y
0
@cabbler This question can be answered in a comment as it is just a user error which is simply fixed. User#5423 17 — 7y

1 answer

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

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

1arrow = script.Parent.Parent:WaitForChild('PlayArrow')
2 
3arrow.Position = UDim2.new(0, 0, 0.2, 0)
4wait(0.05)
5arrow.Position = UDim2.new(0.05, 0, 0.2, 0)
0
True. SkatePro888899999 5 — 7y
Ad

Answer this question