How to make a Hold 'E' Gui?

Basically I want to make the same thing jailbreak has when you arrest someone. They don’t use billboard GUIs they use regular GUI’s. Could someone show me a tutorial on how to do that?

I want something like this:

4 Likes

You would use mouse.Position to get the position of your gui while checking if its on the player. Something like this would be the gist of it:
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local rs = game:GetService(“RunService”)
rs.RenderStepped:Connect(function()
if mouse.Target.Parent:FindFirstChild(“Humanoid”) then
gui.Position = --putmousecoordinateshere
end
end)

1 Like

There is WorldToScreenPoint so you can get the location of where the gui should be.

Simple script which I made to make a gui appear over a certain part.

local Camera = workspace.Camera
local gui = script.Parent
local Frame = gui.Frame
local Part = workspace.Part
local RunService = game:GetService"RunService"
RunService:BindToRenderStep("IconUpdate",Enum.RenderPriority.Last.Value,function()
	local vec = Camera:WorldToScreenPoint(Part.Position)
	Frame.Position = UDim2.new(
		0,
		vec.X,
		0,
		vec.Y
	)
end)
9 Likes

I know this doesn’t answer your question, but you could achieve the exact same affect using BillboardGUIs, assuming you only use Offset in the sizing, instead of scale.

That way you don’t have to run the position loop on RenderStepped which makes it less expensive.

8 Likes

You could use Roblox’s new beta feature called ProximityPrompt.

3 Likes

You could also use magnitude, obtain the distance between each HumanoidRootPart and display the UI based off of this.

I think he also wants a progress circle like jailbreak.

1 Like

you also need to clone i think

You’re replying to a solved topic 3 months later.

2 Likes