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

Why won't the UI become visible even though it ran?

Asked by 4 years ago
Edited 4 years ago

The script works, but part of it won't work.

script.Parent:WaitForChild('ClickDetector').MouseClick:connect(function(plr)
    if plr.PlayerGui:FindFirstChild('SCI') == nil then
        GUI = script.Parent.SCI:Clone()
        GUI.Parent = plr.PlayerGui
        print("hi")
    else
        plr.PlayerGui:WaitForChild("SCI").Enabled = true
        print("lol")
    end
end)

In

plr.PlayerGui:WaitForChild("SCI").Enabled = true

it runs with no error, but there it does not enable.

Answer this question