Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Where is the error Rebirth is not a valid member of Folder? [closed]

Asked by 5 years ago
Edited 5 years ago

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)
0
Copied from alvinbloxx User#24403 69 — 5y

Closed as Not Constructive by User#24403

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?