Hello Devs! I am still a fairly new scripter who just hit 1 year of experience. I finally gained access to the dev forums and I would really like some feedback on the module that I have recently made, called UiAnimationModule.
As the name implies, the goal of the module is to facilitate game-making by giving the developer the abilities to :
- Implement animation templates into a UI component, for easy and reusable animation creation.
- Create their own animation templates using custom Tween Sequences, to use them in game.
The module works by decomposing and playing tweens frame-by-frame, and grouping those tweens in “Tween Sequences” which give the ability to combine multiple tweens in specific orders.
While the module works, it is still pretty bad from a coding standpoint, hence why I would love some constructed criticism on it. It can go from the smallest incoherences to the biggest issues., whether it’s according to your personal standards, or from a logical standpoint.
(Please note that some of the code was made with AI in an attempt to quickly get a functioning version done, due to some of the maths required being above my knowledge)
I am uploading this module with hopes of getting into actual conversations with developers who have more experience and knowledge than me, instead of facing backlash. My code is very far from perfect and might have some triggering mistakes.
If needed, my discord is “xxneweraxx”. I am active there.
Finally, I will be providing code snippets that are using the module as an example, alongside videos that showcases the result, and the uncopylocked place of the module for easy access.
Uncopylocked place :
EXAMPLE 1 : Button + Frame
Code :
task.wait(5)
local rs = game:GetService("ReplicatedStorage")
local UiAnimationModule = require(rs.UiAnimationModule)
local Frame = game.Players.LocalPlayer.PlayerGui.ServerUpgrade.Main
local Button = Frame.Parent.Parent.ScreenGui.TextButton
local Templates = UiAnimationModule.Templates
local Enter = Templates.Entry.ScaleInBottom(Frame)
local Exit = Templates.Exit.ScaleOutBottom(Frame)
local BlurIn = Templates.General.BlurIn(game.Lighting.Blur)
local BlurOut = Templates.General.BlurOut(game.Lighting.Blur)
local Rota = Templates.Interaction.Rotate(Button)
local RotaBack = Templates.Interaction.RotateBack(Button)
local ScaleBack = Templates.Interaction.ScaleBack(Button)
local ScaleUp = Templates.Interaction.ScaleUp(Button)
local GradientThrough = Templates.Interaction.GradientThrough(Button)
Enter.OnBeginning = function()
Frame.Parent.Enabled = true
end
Exit.OnCompleted = function()
Frame.Parent.Enabled = false
end
Button.MouseEnter:Connect(function()
UiAnimationModule.Start(ScaleUp)
UiAnimationModule.Start(Rota)
UiAnimationModule.Start(GradientThrough)
end)
Button.MouseLeave:Connect(function()
UiAnimationModule.Start(ScaleBack)
UiAnimationModule.Start(RotaBack)
end)
Button.MouseButton1Click:Connect(function()
if Frame.Parent.Enabled then
UiAnimationModule.Start(Exit)
UiAnimationModule.Start(BlurOut)
else
UiAnimationModule.Start(Enter)
UiAnimationModule.Start(BlurIn)
end
end)
Video :
EXAMPLE 2 : Image tilt
Code :
local Player = players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")
local Checkpoint = PlayerGui:WaitForChild("Checkpoint")
local Logo = Checkpoint.Logo -- ImageLabel
local In = UiAnimationModule.Templates.Entry.ScaleInBottom(Logo)
local Tilt = UiAnimationModule.Templates.Idle.TiltLeftRight(Logo)
local Pulse = UiAnimationModule.Templates.Idle.Pulse(Logo, {TweenParams = {Duration = .6}})
local Out = UiAnimationModule.Templates.Exit.ScaleOutBottom(Logo)
In.OnBeginning = function()
Checkpoint.Enabled = true
end
Out.OnCompleted = function()
Checkpoint.Enabled = false
end
local function NewStageAnim()
UiAnimationModule.Start(In)
task.wait(.5)
UiAnimationModule.Start(Tilt)
UiAnimationModule.Start(Pulse)
task.wait(1)
UiAnimationModule.Start(Out)
end
NewStageAnim()
Video :