So I’m trying to make it to where after a certain period of time the GUI pops out with a tween, this works but instead of the frame popping out from the middle it pops out from the corner of the UI and it looks very weird.
Anyone know a way to fix this so it pops from the middle instead of the corners?
Here’s my code:
wait(5)
script.Parent:TweenSize(UDim2.new(0.205, 0, 0.221, 0), 'InOut', 'Sine', 1.5,true)
Just set the AnchorPoint of the UI Object to 0.5, 0.5
![image](//devforum-uploads.s3.dualstack.us-east-2.amazonaws.com/uploads/original/4X/e/4/4/e445c59bcaf61b06f2081e2b947db070aa4c151c.png)
4 Likes
Thanks I had it to 0, 0.
Also do you know how to fix text from looking weird when tweening like, when I added more description to where it says “testing” the words looked like they were moving when it was tweening. Any thing to fix that?
No, but I suggest you just set the default visiblity of the ui object to false and change it to true after you’re done tweening it looks way better that way in my opinion
1 Like
How would I go about doing that? I’m new to UI tweening and such so kind of confused.
I personally would just use tweenservice like so:
also when you’re closing the ui object make sure to set the text visibility to false. If your problem is resolved could you set the topic to solved…
local TweenService = game:GetService("TweenService")
local Tweeninfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)
local Tweendata = {Size = UDim2.new(0.205, 0, 0.221, 0)}
local Tween = TweenService:Create(script.Parent, Tweeninfo, Tweendata)
Tween:Play()
Tween.Completed:Wait()
script.Parent.Text.Visible = true -- change to your textlabel
2 Likes
It was missing a ) I accidentally removed that while pasting it
1 Like
ok so I changed the text to my text label name and this was the error
could you show me your explorer and the script you currently have?
I had it in the actual text label so it didn’t work but I moved it to the background frame now and it works