Another error alert! So I’ve been trying to create a game where you sell children for money. The babies are turned into a leaderstat of their own and then you have to turn on the pc and sell them for the babies to turn into the money leaderstat. The scripts work fine at first, but when I disable the gui using a script and try to enable it again, it wont work. These are my 2 scripts.
local screen = script.Parent
local click = screen.Click
click.MouseClick:Connect(function(player)
player.PlayerGui.PCGui.Enabled = true
if player.PlayerGui.PCGui.Enabled == false then
player.PlayerGui.PCGui.Enabled = true
end
end)
^^ Gui Enabler
-- Services
-- Gui
local button = script.Parent
local Gui = button.Parent
-- Other
button.MouseButton1Click:Connect(function()
Gui.Enabled = false
end)
^^ Gui Disabler