-------< variables >--------
local part = script.Parent
local p = game:GetService("Players")
local gui = p.PlayerGui.Shop.ShopFrame
-------< code >-------------
part.Touched:Connect(function(hit)
if gui.Visible == false then
gui.Visible = true
end
end)
the error says that player gui is not a valid member of player (p in my case) any help?

2 comments
You need to take a look into Remote Events/Functions https://developer.roblox.com/en-us/articles/Remote-Functions-and-Events
While your at it, you may want to read over this to get a better understanding of how the client and server differ https://developer.roblox.com/en-us/articles/Roblox-Client-Server-Model