Need help with scripting frame position

Hello!

I am currently trying to make a script that Tweens the Position of a Frame on the players screen. The problem is that after the Tween ends, if I attempt to trigger the Tween again, the Frame will appear from the opposite side and ruin the whole transition.

Code:

script.Parent.Triggered:Connect(function(player)

	player.PlayerGui.Loading.EndSequence.BackgroundColor3 = Color3.new(1, 1, 1)

	player.PlayerGui.Loading.EndSequence:TweenPosition(UDim2.new(0,0,0,0), "InOut", "Quad", 3, true)

	wait(1.75)

	player.Character:MoveTo(Vector3.new(-79.173, 22.453, 1081.271))

	player.PlayerGui.Loading.EndSequence:TweenPosition(UDim2.new(-1,0,0,0), "InOut", "Quad", 3, true)
end)

I think the problem is that I have not changed the frame position after but I don`t really know how to do that… Can anyone help me please?

1 Like

You can change a frames position by doing it like

Frame.Position = UDim2.new(x, y)

1 Like

Thank you very much! I will go ahead and change the script. I marked your response as a solution. :slight_smile:

1 Like