WHERE IS THAT ERROR?!? Help me find it! here:

local replicatedStorage = game:GetService("ReplicatedStorage")
local starterRebirthAmount = 5000

local player = game.Players.LocalPlayer
local mainFrame = script.Parent:WaitForChild("MainFrame")
local rebirthMenu = mainFrame:WaitForChild("RebirthMenu")
local mainButton = script.Parent:WaitForChild("MainButton")
local rebirthButton = rebirthMenu:WaitForChild("RebirthButton")
local shrinkageToRebirth = rebirthMenu:WaitForChild("ShrinkageToRebirth")
local rebirths = player:WaitForChild("leaderstats").Rebirths


shrinkageToRebirth.Text = "You need at least"..math.floor((starterRebirthAmount + (rebirths.value) + math.sqrt(5000))).."shrinkage to rebirth"

mainButton.MouseButton1Click:Connect(function()
	mainFrame.Visible = not mainFrame.Visible
end) 

rebirthButton.MouseButton1Click:Connect(function()
	local result = replicatedStorage.Remotes.Rebirth:InvokeServer()
	
	if result == true then
		rebirthButton.Text = "Successfully rebirthed"
		wait(1)
		rebirthButton.Text = "CLICK HERE TO REBIRTH"
	elseif result == "NotEnoughShrinkage" then
		rebirthButton.Text = "Not small enough"
		wait(1)
		rebirthButton.Text = "CLICK HERE TO REBIRTH"
	end
end)

rebirths:GetPropertyChangedSignal("Value"):Connect(function()
	shrinkageToRebirth.Text = "You need at least"..math.floor((starterRebirthAmount + (rebirths.value) + math.sqrt(5000))).."shrinkage to rebirth"
end)

1 comment

0

Copied from alvinbloxx