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

Why won't this gui script work?

Asked by 10 years ago

Thing gui script doesn't work. Anyone know Why? Please Help!

local shop = script.Parent



local creditstitle = shop:WaitForChild("CreditsTitle")
local label100points = creditstitle:WaitForChild("100PointsLabel")
local label200points = creditstitle:WaitForChild("200PointsLabel")

local gunstitle = shop:WaitForChild("GunsTitle")
local ngtitle = gunstitle:WaitForChild("NG .45Title")

creditstitle.MouseButton1Down:connect(function()
    if ngtitle.Visible == true then
        ngtitle.Visible = false
    end
    if label100points and label100points.Visible == false and label200points and label200points.Visible == false then
        label100points.Visible = true
        label200points.Visible = true
    end
end)

gunstitle.MouseButton1Down:connect(function()
    if label100points and label100points.Visible == true and label200points and label200points.Visible == true then
        label100points.Visible = false
        label200points.Visible = false
    end
    if ngtitle and ngtitle.Visible == false then
        ngtitle.Visible = true
    end
end)

Answer this question