i don't know where the error is in my script
local replicatedStorage = game:GetService("ReplicatedStorage") local remoteData = game:GetService("ServerStorage"):WaitForChild("RemoteData") local staterRebirthAmount = 5000 local cooldown = 1 replicatedStorage.Remotes.Lift.OnServerEvent:Connect(function(player) if not remoteData:FindFirstChild(player.Name) then return "NoFolder" end local debounce = remoteData[player.Name].Debounce if not debounce.Value then debounce.Value = true player.leaderstats.Shrinkage.Value = player.leaderstats.Shrinkage.Value + 10 * (player.leaderstats.rebirths.Value + 1) wait (cooldown) debounce.Value = false else end end) replicatedStorage.Remotes.Rebirths.OnServerInvoke = function(player) if not remoteData:FindFirstChild(player.Name) then return "NoFolder" end local rebirths = player.leaderstats.Rebirths if player.leaderstats.Shrinkage.Value >=(math.floor((starterRebirthAmount + (rebirths.value) + math.sqrt(50000000)))) then rebirths.Value = rebirths.Value + 1 player.leaderstats.Shrinkage.Value = 0 player:LoadCharacter() return true else return "Not enough shrinkage" end end
Try add this
repeat wait() until player.leaderstats:FindFirstChild("Rebirths") local rebirths = player.leaderstats.Rebirths
if this not work, that mean there is no Rebirths in the leaderstats folder.