Help with Gui TweenPositioning

Hello, I fairly new to scripting on roblox and I have been working on the Gui for my game. My current goal is to be able to click one of the start screen buttons and have a new Gui slide in from the right side of the screen whilst the old Gui slides out to the left.

I have just finished the scripting and everything seems like it should work but when I click the button nothing happens. I’ve been playing around with the code and it seems to be because I’m not defining the New Gui using .Parent. Is this because its a local script but the Start screen Gui and the new Gui are not part of the same section?


This is just the first half of the script (Getting the button to make the new Gui appear). Once I resolve this issue I plan to work on a return button on the new Gui to go back to the start screen again.

Screenshot 2023-04-10 194013

So your Gui is tweening but your doing it in the starter gui, and not in the playerGui object. So just do

local EraScreen = script.Parent.Parent.Parent.SelectEraScreen

The StarterGui is what clones into PlayerGui, but after the cloning, it no longer is connected to the players own Gui. So changing things in starter Gui will affect all players when they rejoin.

(Edit: Sorry for all my errors, I’m on my phone lol)

1 Like

It is recommended by many that you would use TweenService instead of using TweenPosition, as it gives you more options.

2 Likes

Thank you so much! This was heavily slowing down the progression of my game esspecially since I had to use forums a bit before I could create a topic. Also would it be fine if I continued to use TweenPositioning or is it much better to convert to TweenService?

1 Like

It depends. You don’t have to.

What @DasKairo means is that if you wanted more options for tweening, like controling more of how it plays, It could be better to switch over. If this is a one time thing though, and your happy how it looks already, you don’t need to worry about it too much, it just what some developers perfer.

So it’s up to you!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.