#animating UI

15 messages · Page 1 of 1 (latest)

cursive raven
#

while wait() do
script.Parent.Rotation = script.Parent.Rotation + 2
end

carmine thorn
#

Instead use tweenservice

cursive raven
#

huh?

#

but this works fine 🧐

carmine thorn
#

Roblox GUI Scripting Tutorial #5 - Tweening GUI (Beginner to Pro 2020)

Hey guys, welcome back to another roblox scripting tutorial in 2020. In today's video I am going to be teaching you guys about Tweening GUI's basically how to make them look really nice and animate them easily. This is a pretty cool function that is in every GUI element. Any...

▶ Play video
carmine thorn
#

Its laggy af

#

And may break

#

Tweening is easier and better

#

Also allows you to make bigger and smaller

cursive raven
#

aswell?

carmine thorn
#

Yes ofc

cursive raven
# carmine thorn https://youtu.be/W-vzIohhWr4?si=0pTxFTVjFts-TXUm

local TweenService = game:GetService("TweenService")
local Players = game:GetService("Players")

local PlayerGui = Players.LocalPlayer:WaitForChild("PlayerGui")
local LoadingScreen = PlayerGui:WaitForChild("LoadingScreen")
local Sparkle1 = LoadingScreen:WaitForChild("Frame"):WaitForChild("ImageLabel")

Sparkle1.AnchorPoint = Vector2.new(0,0)

local aspectRatioConstraint = Instance.new("UIAspectRatioConstraint")
aspectRatioConstraint.Parent = Sparkle1

local targetSize = UDim2.new(0, 437,0, 388)

local tweenInfo = TweenInfo.new(2)
local tween = TweenService:Create(Sparkle1, tweenInfo, {Size = targetSize})

tween:Play()

local targetRotation = 45

local tweenInfo = TweenInfo.new(2)
local tween = TweenService:Create(Sparkle1, tweenInfo, {Rotation = targetRotation})

tween:Play()