so i've made the following code
local starterRebirthAmount = 5000
replicatedStorage.Remotes.Rebirth.OnServerInvoke = function(player)
if not remoteData:FindFirstChild(player.name) then return "NoFolder" end local rebirths = player.leaderstats.Rebirths if player.leaderstats.Rebirths >= ( math.floor((starterRebirthAmount + (rebirths.Value) * math.sqrt(5000000))))then rebirths.Value = rebirths.Value + 1 player.leaderstats.Magic.Value = 0 player:LoadCharacter()
the starterRebirthAmount is a number and so is rebirths.Value, how can one of them be an instace
Sorry by my english it's not my mother language
Don't worry, we all make mistakes.
You forgot to put the ".Value" thing in the if statement, so that's why you're comparing a number and an instance. Also, is your auto indent on? If not, put the "end" word on the bottom of the if statement.
if not remoteData:FindFirstChild(player.name) then return "NoFolder" end local rebirths = player.leaderstats.Rebirths if player.leaderstats.Rebirths.Value >= ( math.floor((starterRebirthAmount + (rebirths.Value) * math.sqrt(5000000))))then rebirths.Value = rebirths.Value + 1 player.leaderstats.Magic.Value = 0 player:LoadCharacter() end -- don't forget to put it
Have a nice day! I gotta go do some work.