An Attempt at a Universal Tween

So, today, I tried out making a system that works as a tween for all instances.

It… didn’t work, but I have a fun 1 hour working on this little project. Here’s the source code.

-- Tweens 
local Speed, EnumTypeEasing, EnumTypeDirection, Object, SetTweenInfo, newProperty
-- Placeholder Speed n' Stuff
Speed = 1
EnumTypeEasing = Enum.EasingStyle.Linear
EnumTypeDirection = Enum.EasingDirection.InOut
Object = gameTitle

local UniversalTweenInfo = TweenInfo.new(
	Speed,
	EnumTypeEasing,
	EnumTypeDirection
)

SetTweenInfo = UniversalTweenInfo

local UniversalTweenPosition = TweenService:Create(
	Object,
	SetTweenInfo,
	{Position=newProperty}
)

local UniversalTweenImgTransparency = TweenService:Create(
	Object,
	SetTweenInfo,
	{ImageTransparency=newProperty}
)


local function ChangeProperties(spd, ease, drtcon, obj, twnInfo, newProp)
	Speed = spd
	EnumTypeEasing = ease
	EnumTypeDirection = drtcon
	Object = obj
	SetTweenInfo = twnInfo
	newProperty = newProp
end

local function TweenTest()
	ChangeProperties(2, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, gameTitle, UniversalTweenInfo, gameTitle.Position, 0)
	UniversalTweenImgTransparency:Play()
	wait(1)
ChangeProperties(2, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, gameTitle, UniversalTweenInfo, gameTitle.Position, UDim2.new(0.1,0,0.2,0))
	UniversalTweenPosition:Play()
end

TweenTest()

Anyway, could any of you see if you can get something similar working? It would be interesting in my opinion. Thank you for your attention.

EDIT: I made a mistake. I accidentally put the ChangeProperties function twice which would’ve made a Gui impossible to appear/move. And my code still doesn’t work.