Help making one leaderstat value go to another leaderstat value in a certain number every second

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? I want to make it so when I touch the button I get my Safes leaderstats value converted to my cash leaderstats value in a certain number per seconds.

  2. What is the issue? Include screenshots / videos if possible!

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub? Yes, I’ve tried everything. It may just be the way I describe it, but I’m sure I wont find anything that works.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

So I’m new to lua and basically as you read above I want to make my safes leaderstat value convert to the cash leaderstat value. It does it perfectly, but I’d like to make it so it does it in a certain number (probably from a string) every second. Sorry if im explaining it bad

					local player = game.Players:GetPlayerFromCharacter(hit.Parent)
					if player then
						if hit.Parent:FindFirstChild("Humanoid") then
							if player.leaderstats.Safes.Value >=1 then
								script.Parent.Parent.SafeMelter.ParticleEmitterBlock.ParticleEmitter:Emit(70)
							player.leaderstats.Cash.Value += player.leaderstats.Safes.Value
								player.leaderstats.Safes.Value = 0

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.