Hello! I am aware of functions and things. However I would like to write a function to get a value based off of a type and an alpha (prime example being TweenService:GetValue()) I am trying to make a way to customize the function that TweenService:GetValue returns (like to change the multiplier on the elastic enum type). I don’t know how to google it but all I know I need is some way to get a line like this

(which is easy since y=x then you just return the alpha)

This is a linear function but I would like to know how to make a curved function (or if there is any alternatives to getting a new alpha based on this method)

I’m not sure exactly what you’re looking for, but you can do x^2 for scaling:

Note there’s a ton of really nice functions that scale from 0 to 1. What you can do is map your number to 0 and 1, apply the transform, and then back it out again.

Consider:

local function quadratic(num, min, max)
return Math.map(Math.map(num, min, max, 0, 1)^2, 0, 1, min, max)
end