Making Speed work as WalkSpeed and Attackspeed

Hello! So i wanted to make the speed stat on my game works as the Player’s Speed and the Weapon’s attack speed, i’ve already done the attack speed part but i dont know how i will go in the player.

The default speed is 5, which i need some formula or way to turn it into 16 for example.

It’s an cooldown, the formula for the attack speed is 1/spd

something like this?

local function speedToWalkSpeed(spd: number)
	return 16 + (spd-5)*DELTA 
	--// replace DELTA with how many walkspeed
	--// "points" should be gained with
	--// every speed level over 5
end

for example, with a DELTA of 0.3 and speed stat of 30 the walkspeed wold be 23.5
higher DELTA yields in higher speed per speed stat

Probably it’s what i was looking for, thank you and sorry for not understand a simple math problem

it’s okay, after all Roblox adverties that anyone can make a game :wink: