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.

3 comments
You aren't suppose to be able to access ServerStorage or ServerScriptService with localscripts
http://wiki.roblox.com/index.php?title=API:Class/ServerStorage
Use ServerScripts. LocalScripts are supposed to be in StarterGui,StarterPack,orStarterPlayer.