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

I cant rebirth when i click it in my game, is my script wrong?

Asked by 3 years ago
Edited 3 years ago

so, i have been trying to make a simulator in roblox by watching alvinblox’s vid, I am on the second part of his series and i have finished all the scripting, However, when i clicked rebirth when i had all the requirments nothing happened. I have tracked where the problem is coming from but have no clue how to fix it. Please Help.

Script:

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

local player = game.Players.LocalPlayer local mainFrame = script.Parent:WaitForChild("MainFrame") local rebirthMenu = mainFrame:WaitForChild("RebirthMenu") local rebirthButton = script.Parent:WaitForChild("RebirthButton") local rebirthButtonInMenu = rebirthMenu:WaitForChild("RebirthButtonInMenu") local fatToRebirth = rebirthMenu:WaitForChild("FatToRebirth")

local rebirths = player:WaitForChild("leaderstats").Rebirths

fatToRebirth.Text = "You need at least "..math.floor((starterRebirthAmount +(rebirths.Value) * math.sqrt(100000000))).." fat to rebirth" print("got past") rebirthButton.MouseButton1Click:connect(function() mainFrame.Visible = not mainFrame.Visible

end)

rebirthButtonInMenu.MouseButton1Click:Connect(function() local result = replicatedStorage.Remotes.Rebirth:InvokeServer() if result ==true then rebirthButtonInMenu.Text = "Success" wait(1) rebirthButtonInMenu.Text = "Rebirth!!" elseif result == "NotEnoughStregnth" then rebirthButtonInMenu.Text = "Become more chubby" wait(1) rebirthButtonInMenu.Text = "Rebirth!!" end

end)

rebirths:GetProperteyChangedSignal("Value"):Connect(function() fatToRebirth.Text = "You need at least "..math.floor((starterRebirthAmount +(rebirths.Value) * math.sqrt(100000000))).." fat to rebirth" end)

0
Please put your code into a code block by selecting it then clicking the blue "Lua" button. This makes it much easier to read. hpenney2 53 — 3y
0
i will thank u Braftedr 0 — 3y

1 answer

Log in to vote
0
Answered by
DesertusX 435 Moderation Voter
3 years ago

You spelt :GetPropertyChangedSignal() wrong.

Ad

Answer this question