Issues with making custom clickable prompts

So I’ve been making my game for a while now, and have successfully made a prompt system for it, however, they lack the ability to be clicked

I’ve looked at situations such as “input types” and such, but it seems a little to confusing, and I don’t even know if my code could even use it the way it’s written.

right now I’m using “adornees” for StarterGui, and so far everything seems fine except for the fact that the BillboardGui stays in it’s parent part. I have know idea how to fix this and have not found anything helpful.

Heres the code for reference:

local ProximityPromptService = game:GetService("ProximityPromptService")

local NewPrompt

ProximityPromptService.PromptShown:Connect(function(p)
	NewPrompt = game.ReplicatedStorage.BillboardGui:Clone()
	NewPrompt.Adornee = p.Parent
	NewPrompt.Parent = game.Players.LocalPlayer.PlayerGui.Prompts
	
	NewPrompt.Frame.ImageLabel.InteractItem.Text = p.ObjectText
	NewPrompt.Frame.ImageLabel.Action.Text = p.ActionText
	NewPrompt.Parent = p.Parent
end)
ProximityPromptService.PromptButtonHoldBegan:Connect(function(p)
	NewPrompt.Frame.ImageLabel.Action.Text = "Please Wait..."
end)
ProximityPromptService.PromptButtonHoldEnded:Connect(function(p)
	NewPrompt.Frame.ImageLabel.Action.Text = p.ActionText
	NewPrompt.Frame.ImageLabel.Fill.Size = UDim2.new(0.45, 0, 0, 0)
end)
ProximityPromptService.PromptTriggerEnded:Connect(function(p)
	NewPrompt.Frame.ImageLabel.Fill.Size = UDim2.new(0.45, 0, 0, 0)
end)

ProximityPromptService.PromptHidden:Connect(function(p)
	NewPrompt:Destroy()
end)


if anyone could help, I’d greatly appreciate it!

1 Like