Hi I am having some severe trouble with replicated a ScreenGUI but in 3D Space, I know I would have to use a ScreenGui that will follow the camera and scale and move with the screen but I just dont know any of the math behind it, any help would be good!
Every solution that I have tried does not work when screens are smaller or bigger than mine or have a higher FOV
Here is a example from a game I like that does what I want to achieve:
Do you know how to make the part follow the camera and rescale with screen size and FOV because I already knew the SurfaceGui part but how would I make it behave like a actual 2D UI with 3d properties thanks for the help but I need some more if u can offer it
the thing is I tried that but it just never fits the screen right and changes in scale, i even tried doing my own math to make it try fit but it just never does so i dont know what to do
move the part position relative to the camera facing the camera and then tweak the offset until it looks right
local testPart = Instance.new("Part")
local rs = game:GetService("RunService")
local camera = game.Workspace.CurrentCamera
rs.Stepped:Connect(function()
local newPos = camera.CFrame.Position + camera.CFrame.LookVector*3 -- add offset relative to lookvector
testPart.CFrame = CFrame.lookAt(newPos, camera.CFrame.Position)
end)