Make GUI kinda follow camera

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

A GUI kinda follows and rotate the camera like in this video that I saw Video
The Health GUI kinda follows the camera if the camera rotate

  1. What is the issue? Include screenshots / videos if possible!

Idk how to sync the rotation & positon with camera

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I looked in dev hub but nothing.

1 Like

try UserInputService:GetMouseDelta() and Lerp

local UserInputService = game:GetService("UserInputService")

local Gui = script.Parent -- the gui thingy 
local GuiPos = Gui.Position

UserInputService.InputChanged:Connect(function(Input)
	if Input.UserInputType == Enum.UserInputType.MouseMovement then
		local Delta = UserInputService:GetMouseDelta()
		Gui.Position = Gui.Position:Lerp(GuiPos + UDim2.fromOffset(Delta.X, Delta.Y), 0.1)
	end
end)

or another solution

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.