local player = game.Players.LocalPlayer
local stats = player:WaitForChild("leaderstats")
local coins = stats:WaitForChild("Coins")
local rebirths = stats:WaitForChild("Rebirths")


while true do
	wait()
	if player.leaderstats.Rebirths.Value == 0 then
		if player.leaderstats.Coins.Value >= 10000000 then
			script.Parent.Text = "You Have Enough Coins To Rebirth!"
		else
			local required_coins = 10000000
			script.Parent.Text = "Coins Needed: "..required_coins - player.leaderstats.Coins.Value
		end
	elseif player.leaderstats.Rebirths.Value >= 1 then
		if player.leaderstats.Coins.Value >= 10000000 * player.leaderstats.Rebirths.Value * 3 then
			script.Parent.Text = "You Have Enough Coins To Rebirth!"
		else
			script.Parent.Text = "Coins Needed: "..player.leaderstats.Coins.Value >= 10000000 * player.leaderstats.Rebirths.Value * 3 - player.leaderstats.Coins.Value
		end
	end
end

5 comments

0

It's definitely because you're trying to put >= in the string. As the error said you can't compare numbers in a string. Remove the >= sign and the number after that and your code should work.

0

It's definitely because you're trying to put >= in the string. As the error said you can't compare numbers in a string. Remove the >= sign and the number after that and your code should work.

0

It's definitely because you're trying to put >= in the string. As the error said you can't compare numbers in a string. Remove the >= sign and the number after that and your code should work.

0

It's definitely because you're trying to put >= in the string. As the error said you can't compare numbers in a string. Remove the >= sign and the number after that and your code should work.

0

Make sure coin is a number value and not a string value