I’m making a gun script right now and I have 2 values, 1 called “MaxDamage” which is the max damage it can deal when the person hit is right up close and 1 called “MinDamage” which is the min damage it can deal when the person hit is at the farthest range of the bullet.
How would I make it so that the player hit gets dealt more damage the closer they are to the person who shot them and less the farther away?