✓ Accepted answer
To accommodate for Filtering Enabled, you'll have to use a remote event, because server scripts cannot access existing members of PlayerGui. They may only add new objects to it.
--Server Script
local remote = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent")
local part = script.Parent
part.Touched:Connect(function(hit)
local plr = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
if plr then
remote:FireClient(plr,"")
end
end)
--Local Script
local remote = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent")
local plr = game:GetService("Players").LocalPlayer
remote.OnClientEvent:Connect(function(args)
if plr.PlayerGui:FindFirstChild("Shop") then
plr.PlayerGui.Shop.Frame.Visible = true
end
end)