In jailbreak, there are these robbery indicators thingies, showing where a robbery is.
I was wondering how to make these, cause whenever I tried to do this with an ImageLabel with a BillboardGUI, there was no setting to make the image not become extremely enlarged the further you walk away from it, and also in Jailbreak, if you go too close to it, it’ll disappear, I’m also wondering how to do that.
I’m assuming the way to do this is with code, but I do not know how to code this.
Use the scale setting of size instead of the offset setting. To make it disappear, check the magnitude (distance) between the player and the BillboardGUI, if the player is too close, disable the GUI.
Yes, a BillboardGUI is what you need. Use the AlwaysOnTop property and set the size of the BillboardGui using scale and not offset (ScaleX, OffsetX, ScaleY, OffsetY).
This you’ll have to use a script for.
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local RobberyIconParent = game.Workspace.Part
local RANGE = 20
RunService.Heartbeat:Connect(function()
local Char = Player.Character
if not Char then return end
local HRP = Char:WaitForChild("HumanoidRootPart")
if not HRP then return end
if (HRP.Position - RobberyIconParent.Position).Magnitude >= RANGE then
print("IN RANGE")
RobberyIconParent.BillboardGui.Enabled = false
else
RobberyIconParent.BillboardGui.Enabled = true
end
end)
This is a simple local script (in starter player scripts) that every heartbeat the function will fire, it first gathers the variables, then checks if the player is a certain distance away!
There is also a great community resource provided by @PersonifiedPizza, which presents a really cool Location Marker System similar to what you are looking for, you can take a look at how the resource is created! You can find the post here: