this code opens the shop when someone touches the shop, please help me fix this Code:

local guiname="Shop"
local Players=game:GetService"Players"
local function showgui(player,guiname)
	player.PlayerGui[guiname].Shop.PetInventory.Visible=true
end
local a;workspace.ShopPart.Touched:Connect(function(part)
	if a then return end;a=true
	local player=Players:GetPlayerFromCharacter(part.Parent)
	if player then
		pcall(showgui,player,guiname)
	end
	wait(1)a=false
end)