How do i script a press and hold E on part to make gui visible?

how do i make this script so when you press and hold E on the “ProximityPrompt” it will open a gui.

(im trying to make my own pet hatching system and have pets in my game)

local frame = game.StarterGui.PetGui.Frame

local prox = script.Parent

prox.Triggered:Connect(function(plr)
	frame.Visible = true
end)

startergui would affect whoever just joined the game. use playerGui in the function:

local prox = script.Parent

prox.Triggered:Connect(function(plr)
	local frame = plr.PlayerGui.PetGui.Frame
	frame.Visible = true
end)