local player = game.Players.LocalPlayer local Mouse = player:GetMouse() local GUI = script.Parent.MainGUI Mouse.KeyDown:connect(function(key) if key == "f" and GUI.Visible == false then GUI.Visible = true elseif key == "f" and GUI.Visible == true then GUI.Visible = false end end)
For some reason, ROBLOX only recognizes LocalPlayer, and Player1 (The Test For Roblox Studio) what should I use to replace LocalPlayer, so that everyone can open the shop?
local player = game.Players.LocalPlayer local Mouse = player:GetMouse() local GUI = script.Parent.MainGUI.Frame Mouse.KeyDown:connect(function(key) if key == "f" then GUI.Visible = not GUI.Visible end end)
You were calling on the GUI, not the frame inside. The GUI object is to hold the GUI elements. If everything is messy in the GUI then just put it in a frame that fits the whole screen.