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

Why does my gui move to a corner? (Gui is curved)

Asked by 6 years ago
Edited 6 years ago
script.Parent.MouseButton1Down:connect(function()
script.Parent.Parent:TweenPosition(UDim2.new(450, 50, 1, 0),"Out","Sine")
end)

I got the X and Y values in there...

1 answer

Log in to vote
1
Answered by
Zafirua 1348 Badge of Merit Moderation Voter
6 years ago
Edited 6 years ago

A very silly mistake. Values of Scale property only take values from 0-1. Here, you are putting 450 which is a HUGE value.

Change the value to 0 or the actual original position of the frame.

local frame = script.Parent.Parent 
frame:TweenPosition(UDim2.new(0.5, -235, 1, 100),"Out","Sine", 1)
Ad

Answer this question