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

This script only works in studio why?

Asked by
duckyo01 120
8 years ago
gui = script.Parent 
guisToHide = {script.Parent.Parent.Lol,script.Parent.Parent.Loler,script.Parent.Parent,script.Parent.Parent.ImageLabel}

if not game.Players.LocalPlayer:FindFirstChild("Boolean") then --If the value doesn't exist
    local bool = Instance.new("BoolValue",game.Players.LocalPlayer) --Create the value
    bool.Name = "Boolean" --Name it
else --If it exists
    gui.Visible = false --Make the guis invisible
    for _,c in pairs(guisToHide) do
        c.Visible = false
    end
end

gui.MouseButton1Click:connect(function() 
    if gui.Visible == true then
        gui.Visible = false
        for _,c in pairs(guisToHide) do
            c.Visible = false
        end
    end
end)
0
You should probably make a variable for script.Parent.Parent, that table is as long as the human genome. Make sure that you do :WaitForChild("Loler") and stuff like that. Legojoker 345 — 8y

Answer this question