xDeltaXen
(xDeltaXen)
1
I not used to gui’s but i dont know why this is not tweening outwards from the center of the screen.
wait(1.75)
local HttpService = game:GetService("HttpService")
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = HttpService:GenerateGUID()
ScreenGui.Parent = LocalPlayer.PlayerGui
local Size = 100
local Frame = Instance.new("Frame")
Frame.AnchorPoint = Vector2.new(.5, .5)
Frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
Frame.Position = UDim2.new(.5, -Size / 2, .5, -Size / 2)
Frame.Parent = ScreenGui
Frame:TweenSize(UDim2.new(0, Size, 0, Size))
Also is there another why of tweening the size before setting the parent?
not in the center!
Is it tweening at all for you?
xDeltaXen
(xDeltaXen)
3
Yes in the wrong position look at the image
xDeltaXen
(xDeltaXen)
4
Its a little to far to the right
Change -size/2 to 0
Otherwise it won’t be in the center
xDeltaXen
(xDeltaXen)
6
Thats not what is the problem the anchor point is
It is the problem because you already set the anchorpoint to .5, .5 and that is correct.
xDeltaXen
(xDeltaXen)
8
No anhcor point
but it is tweening from top right to bottom left not outward
Vector3.new(.5, 0, .5, 0) Sets it in the middle if there is an anchor point of Vector2.new(.5, .5)
xDeltaXen
(xDeltaXen)
10
Oh thanks it actually worksssss
xDeltaXen
(xDeltaXen)
11
But what about my other question?
Why would you want to tween before parenting?
xDeltaXen
(xDeltaXen)
13
Not start the wteen before the parent without getting tweening object must be in workspace error
You can’t tween an object that isn’t in PlayerGui.
xDeltaXen
(xDeltaXen)
15
What about using TweenService:Create()?
Then yes. charrrrrrrsssssssssss
:TweenSize() is specifically for Guis only not for parts and otherstuff. If you want to use tweening for other things you would use TweenService.
TweenService is better and is a replacement of TweenSize() and TweenPosition()
xDeltaXen
(xDeltaXen)
20
How do I check if tweensize has finsihed tweening though?