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

[SOLVED] Why is simple TweenPosition not working? [NO ERRORS PRINTED]

Asked by 4 years ago
Edited 4 years ago

I tried running that code:

script.Parent.MouseButton1Click:Connect(function()
    local x = script.Parent.Parent.Position.X

    script.Parent.Parent:TweenPosition(UDim2.new(x,0,.2,0),'Out','Quart',1)
end)

(yes, the frame selected (line 2) is active and all its components) but it dosen't work? It just doesn't play, got any ideas?

Explorer: http://prntscr.com/rbqts3

0
-200 too much of a number for the first y value, as it will match the screen in any size. So, the position should be from -2 to 2 if you want it on screen or not. killerbrenden 1537 — 4y
0
The result in this, is it's tweening to position to -200 in 1 second. That's really fast, try putting the number between -2 and 2. killerbrenden 1537 — 4y
0
Dosen't work... ParentProfanities 28 — 4y
0
And @killerbrenden also, dosen't work.. I changed it to .2 ParentProfanities 28 — 4y
View all comments (3 more)
0
I changed the position to .2 ParentProfanities 28 — 4y
0
Can you show us a picture of how you setup your gui (a hierarchy)? killerbrenden 1537 — 4y
0
Sure look at edit! ParentProfanities 28 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

It won't move because it's setting the position of X that it's already at. So if X = 0.5, then it will tween to 0.5, where it's already at. You have to manually put in the value you want it to tween to.

0
Thanks! ParentProfanities 28 — 4y
0
No problem! killerbrenden 1537 — 4y
Ad

Answer this question