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

GUI keeps going to the upper right corner?

Asked by 4 years ago

Not Sure how But... The GUI keeps going to the left upper corner which is a bit odd...

I've tried countless times and spend hours trying to figure out the problem.. I would really appreciate it to whoever helps me...

Heres the script

script.Parent.ClickDetector.MouseClick:Connect(function(plr)
        -------------START OF TWEEN-----------------
local tweenservice = game:GetService("TweenService") 
local tweeninf = TweenInfo.new(
    1,3, --length
    Enum.EasingDirection.Out, -- out     
    0, --times 2 repeat
    true,
    0

    )
    local partprob = {
        Position = UDim2.new({-1.947, 0},{-1.305, 0}); -- putting it on the center
         Size = UDim2.new({4.893, 0},{3.608, 0}) -- making it small

        }

    local tween = tweenservice:Create(plr.PlayerGui.ScreenGui.Cutscene,tweeninf,partprob )
    tween:Play()
            wait(2,3)
        ---------------END OF TWEEN------------------

        plr.Character.Torso.CFrame = CFrame.new(-939.591, 14.465, 6.529)
end)

Here's a gif of what happens...

https://gyazo.com/91c7f65dac47e96074d6d0ab55ce1fd7

Thank you.

1 answer

Log in to vote
0
Answered by 4 years ago

The Middle of your screen is 0.5, maybe try that.

Ad

Answer this question