【发布时间】:2020-03-08 21:05:59
【问题描述】:
<---This is my current local script--->
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 strengthToRebirth = rebirthMenu:WaitForChild("StrengthToRebirth")
local rebirths = player:WaitForChild("leaderstats").Rebirths <--The Bit I think is causing the
problems.
strengthToRebirth.Text = "You need at least "..math.floor((starterRebirthAmount + (rebirths.Value) *
math.sqrt(500000))).." strength 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 == "NotEnoughStrength" then
rebirthButton.Text = "Not Strong Enough!"
wait(1)
rebirthButton.Text = "CLICK HERE TO REBIRTH"
end
end)
rebirths:GetPropertyChangedSignal("Value"):Connect(function()
strengthToRebirth.Text = "You need at least "..math.floor((starterRebirthAmount + (rebirths.Value) *
math.sqrt(5000000))).." strength to rebirth" end)
我每次都遇到同样的错误。 21:10:20.963 -
无限产量可能在 'Players.Archerofcool:WaitForChild("leaderstats")'
【问题讨论】:
-
我忘了说这让我的整个游戏都变砖了。
-
另外说明,lua cmets 是
--而不是<---