I am trying to create a rebirth system but I am having some issues with it. After the rebirth is over 1 whenever any points are gained it adds an insane amount instead of adding the change in value. I added a print function to see what the change in value was and it printed a bunch of numbers instead of 1 all multiplied by 2. How do I fix this?
game.ReplicatedStorage.RebirthEvent.OnServerEvent:Connect(function(player) local rebirths = player.leaderstats.Rebirths local robux = player.leaderstats.Robux local CR = 0 robux.Changed:Connect(function() local currentRobux = 0 local robuxChanged = robux.Value - currentRobux if rebirths.Value >=1 then robux.Value = robux.Value + robuxChanged currentRobux = robux.Value print(robuxChanged) end end) end)