In LocalScripts I can't access things like ServerStorage, ServerScriptService, or Players sometimes. Is this just something that happens, or is it a bug? (I'm making an admin GUI, but it's finished) Hope someone can help here.
game:GetService("ServerStorage") game.ServerStorage:FindFirstChild("adminGUIdb") bin = script.Parent function Click() local gui = game.Workspace.adminGUI2 --See, I must use Workspace in a LocalScript local p = game.Players.LocalPlayer if bin.open.Value == 0 then gui:Clone().Parent = p.PlayerGui script.Parent.Text = "Close R1" bin.open.Value = 1 elseif bin.open.Value == 1 then p.PlayerGui.adminGUI2:Destroy() script.Parent.Text = "Open R1" bin.open.Value = 0 end end bin.MouseButton1Click:connect(Click)
I can access Workspace, and that is my current method. EDIT: I am using a LocalScript.
Local scripts cannot access ServerStorage or ServerScriptService. It is in the name of both "Server", you have to use a server script to access these items.