You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
Tool that make a gui appear when activated and the gui has a frame that somehow teleports into the position of an npc but it dissapears when the npc is out of the screen.
What is the issue? Include screenshots / videos if possible!
I dont know how to make a frame go to the position of a npc.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
local part = workspace.Monsters.Siren_Head.HumanoidRootPart
local camera = workspace.CurrentCamera
local worldPoint = part.Position
local vector = camera:WorldToScreenPoint(worldPoint)
local screenPoint = UDim2.new(0, vector.X, 0, vector.Y)
local depth = vector.Z
while true do
script.Parent.Show.ThePosition.Position = screenPoint
task.wait(1)
end
local part = workspace.Monsters.Siren_Head.Head
local camera = workspace.CurrentCamera
local worldPoint = part.Position
while true do
local vector = camera:WorldToScreenPoint(worldPoint)
local screenPoint = UDim2.new(0, vector.X - 50, 0, vector.Y - 50)
script.Parent.Position = screenPoint
task.wait(.1)
end