How would I use ProximityPrompt to pull up a text ui that the player has to dismiss?

So, I’ve inserted the proximity prompt into a union that I want the player to be able to interact with. How would I make it so when the player presses E, there is a text displaying ui that gives the player information on the item? Any help would be greatly appreciated!

This should help:

1 Like

Thanks, there is a lot of areas to insert textures, (Im not a coder or UI designer) what goes there?

You can create a server script and insert something like this:

local prompt = script.Parent -- or wherever the prompt is

prompt.Triggered:Connect(function(player) -- player who pressed
   local playerGui = player:WaitForChild("PlayerGui") -- the player gui
   local targetGui = playerGui:WaitForChild("insert screen gui name here") -- the screen gui to enable (if you're enabling one)

   -- code here

   --[[ example code:
       if not targetGui.Info.Visible then
           targetGui.Info.Visible = true
           wait(5)
           targetGui.Info.Visible = false
       end
   ]]
end) -- the event to detect when the prompt is interacted with

-- just an example of what the script should look like

You can customize what button is pressed through the Proximity Prompt instance

1 Like